Changing Controller Numbers in Solaris
If you need to change the controller numbers (c#) that a disk has assigned to it, whether it is for cluster, Solstice DiskSuite[TM]/Solaris[TM] Volume Manager, or just for ease of management. With Solaris[TM] 8 and above, there is a new directory, /dev/cfg, that allows us to move them easily.
Steps to Follow
You will have to quiesce the data to all of the devices that you are going to move. This cannot be done while the system is trying to access these paths. This works for SAN, and internal disks.
Looking at the output of format and cfgadm we can see that our disks are on c3 and c4.
root@ralph / # echo|format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1f,0/pci@1,1/ide@3/dad@0,0
1. c3t50020F230000C21Ed0
/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0/ssd@w50020f230000c21e,0
2. c3t50020F230000C21Ed1
/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0/ssd@w50020f230000c21e,1
3. c3t50020F230000C21Ed2
/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0/ssd@w50020f230000c21e,2
4. c3t50020F230000C21Ed3
/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0/ssd@w50020f230000c21e,3
5. c4t50020F230000C21Ed0
/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0/ssd@w50020f230000c21e,0
6. c4t50020F230000C21Ed1
/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0/ssd@w50020f230000c21e,1
7. c4t50020F230000C21Ed2
/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0/ssd@w50020f230000c21e,2
8. c4t50020F230000C21Ed3
/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0/ssd@w50020f230000c21e,3
Specify disk (enter its number): root@ralph / # cfgadm -o show_FCP_dev -al
Ap_Id Type Receptacle Occupant Condition
c3 fc-fabric connected configured unknown
c3::50020f230000c21e,0 disk connected configured unknown
c3::50020f230000c21e,1 disk connected configured unknown
c3::50020f230000c21e,2 disk connected configured unknown
c3::50020f230000c21e,3 disk connected configured unknown
c4 fc-fabric connected configured unknown
c4::50020f230000c21e,0 disk connected configured unknown
c4::50020f230000c21e,1 disk connected configured unknown
c4::50020f230000c21e,2 disk connected configured unknown
c4::50020f230000c21e,3 disk connected configured unknown
Looking at /dev/cfg, you can see that there are links to the device paths with a controller number designation.
root@ralph / # cd /dev/cfg
root@ralph /dev/cfg # ls
./ ../ c0@ c3@ c4@
root@ralph /dev/cfg # ls -l
total 16
drwxr-xr-x 2 root root 512 Apr 20 12:50 ./
drwxr-xr-x 17 root sys 3584 May 5 17:47 ../
lrwxrwxrwx 1 root root 41 Apr 6 14:18 c0 -> ../../devices/pci@1f,0/pci@1,1/ide@3:scsi
lrwxrwxrwx 1 root root 49 Apr 13 15:21 c3 -> ../../devices/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0:fc
lrwxrwxrwx 1 root root 51 Apr 13 15:21 c4 -> ../../devices/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0:fc
root@ralph / # cd /dev/cfg
root@ralph /dev/cfg # ls
./ ../ c0@ c3@ c4@
root@ralph /dev/cfg # ls -l
total 16
drwxr-xr-x 2 root root 512 Apr 20 12:50 ./
drwxr-xr-x 17 root sys 3584 May 5 17:47 ../
lrwxrwxrwx 1 root root 41 Apr 6 14:18 c0 -> ../../devices/pci@1f,0/pci@1,1/ide@3:scsi
lrwxrwxrwx 1 root root 49 Apr 13 15:21 c3 -> ../../devices/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0:fc
lrwxrwxrwx 1 root root 51 Apr 13 15:21 c4 -> ../../devices/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0:fc
All you have to do at this point, is remove any extra links, for clean up. And then move the controller, in this case c4, to the new controller number.
root@ralph /dev/cfg # mv c4 c2
root@ralph /dev/cfg # mv c4 c2
Now the '../../devices/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0:fc' link has been moved from c4 to c2. When we recreate the link Solaris will look at this and create all of the links on c2. In a sense 'forcing' it to the controller that we want.
root@ralph /dev/cfg # ls
./ ../ c0@ c2@ c3@
root@ralph /dev/cfg # ls -l
total 16
drwxr-xr-x 2 root root 512 May 9 10:17 ./
drwxr-xr-x 17 root sys 3584 May 9 10:18 ../
lrwxrwxrwx 1 root root 41 Apr 6 14:18 c0 -> ../../devices/pci@1f,0/pci@1,1/ide@3:scsi
lrwxrwxrwx 1 root root 51 Apr 13 15:21 c2 -> ../../devices/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0:fc
lrwxrwxrwx 1 root root 49 Apr 13 15:21 c3 -> ../../devices/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0:fc
root@ralph /dev/cfg # ls
./ ../ c0@ c2@ c3@
root@ralph /dev/cfg # ls -l
total 16
drwxr-xr-x 2 root root 512 May 9 10:17 ./
drwxr-xr-x 17 root sys 3584 May 9 10:18 ../
lrwxrwxrwx 1 root root 41 Apr 6 14:18 c0 -> ../../devices/pci@1f,0/pci@1,1/ide@3:scsi
lrwxrwxrwx 1 root root 51 Apr 13 15:21 c2 -> ../../devices/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0:fc
lrwxrwxrwx 1 root root 49 Apr 13 15:21 c3 -> ../../devices/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0:fc
Next remove all of the old device links in /dev/rdsk and /dev/dsk
root@ralph /dev/cfg # cd /dev/rdsk
root@ralph /dev/rdsk # rm -r c4*
root@ralph /dev/rdsk # cd /dev/dsk
root@ralph /dev/dsk # rm -r c4*
root@ralph /dev/cfg # cd /dev/rdsk
root@ralph /dev/rdsk # rm -r c4*
root@ralph /dev/rdsk # cd /dev/dsk
root@ralph /dev/dsk # rm -r c4*
With direct attached disks and san disks that are already configured with cfgadm, just run devfsadm -C to clean up dangling /dev links.
root@ralph /dev/dsk # devfsadm -C
root@ralph /dev/dsk # devfsadm -C
Now format and cfgadm show the c4 devices on c2.
root@ralph /dev/dsk # echo|format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0
/pci@1f,0/pci@1,1/ide@3/dad@0,0
1. c2t50020F230000C21Ed0
/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0/ssd@w50020f230000c21e,0
2. c2t50020F230000C21Ed1
/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0/ssd@w50020f230000c21e,1
3. c2t50020F230000C21Ed2
/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0/ssd@w50020f230000c21e,2
4. c2t50020F230000C21Ed3
/pci@1f,0/pci@1/SUNW,qlc@3,1/fp@0,0/ssd@w50020f230000c21e,3
5. c3t50020F230000C21Ed0
/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0/ssd@w50020f230000c21e,0
6. c3t50020F230000C21Ed1
/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0/ssd@w50020f230000c21e,1
7. c3t50020F230000C21Ed2
/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0/ssd@w50020f230000c21e,2
8. c3t50020F230000C21Ed3
/pci@1f,0/pci@1/SUNW,qlc@3/fp@0,0/ssd@w50020f230000c21e,3
Specify disk (enter its number):
You can do this to any controller except the device that you are booted off of. Doing this procedure on your boot controller can cause the system to panic.
Changing Controller Numbers in Solaris的更多相关文章
- HOJ题目分类
各种杂题,水题,模拟,包括简单数论. 1001 A+B 1002 A+B+C 1009 Fat Cat 1010 The Angle 1011 Unix ls 1012 Decoding Task 1 ...
- REST API设计指导——译自Microsoft REST API Guidelines(四)
前言 前面我们说了,如果API的设计更规范更合理,在很大程度上能够提高联调的效率,降低沟通成本.那么什么是好的API设计?这里我们不得不提到REST API. 关于REST API的书籍很多,但是完整 ...
- SSL & TLS & STARTTLS
https://www.fastmail.com/help/technical/ssltlsstarttls.html SSL vs TLS vs STARTTLS There's often qui ...
- 4.9 Routing -- Query Parameters
一.概述 1. 在URL中查询参数是可选的key-value对,出现在?的右边.例如,下面的URL有两个查询参数,sort和page,对应的值分别是ASC和2. example:http://exam ...
- 雪崩利器 hystrix-go 源码分析
阅读源码的过程,就像是在像武侠小说里阅读武功秘籍一样,分析高手的一招一式,提炼出精髓,来增强自己的内力. 之前的帖子说了一下微服务的雪崩效应和常见的解决方案,太水,没有上代码怎么叫解决方案.githu ...
- iOS开发中的错误整理,Changing the delegate of a tab bar managed by a tab bar controller is not allowed
iOS [错误:'Changing the delegate of a tab bar managed by a tab bar controller is not allowed.'] 错误:'Ch ...
- Solaris/Linux 命令手册
无意翻到之前收藏的一个文档,共享一下. Solaris/Linux 命令手册 1. 系统 # passwd:修改口令 # exit:退出系统 2. 文件 # cp:复制文件或目录,参数:-a递归目录, ...
- Disk array controller and information processing apparatus
A disk array controller has a function of relocating a plurality of data blocks stored in a disk arr ...
- ASP.NET MVC搭建项目后台UI框架—5、Demo演示Controller和View的交互
目录 ASP.NET MVC搭建项目后台UI框架—1.后台主框架 ASP.NET MVC搭建项目后台UI框架—2.菜单特效 ASP.NET MVC搭建项目后台UI框架—3.面板折叠和展开 ASP.NE ...
随机推荐
- StringToInt(atoi) 字符串转换成整数
public class StringToInt { public int atoi(String s) { long num = 0; int minus = 0; if(s==null) { re ...
- 【转】Oracle中插入和取出图片(用BLOB类型)
原文地址:http://czllfy.iteye.com/blog/66737 其他参考资料地址:http://lavasoft.blog.51cto.com/62575/321882/ 要在orac ...
- 我的博客搬家到https://www.w2le.com/了
大家以后想看我的博文的请到这里哦,欢迎大家访问https://www.w2le.com/
- 5.3 Razor语法基础
以往开发ASP.NET Web Form时,在ASPX页面上都会出现许多夹杂C#/VB.NET与HTML的情况,而先前使用<%...%>这种传统圆角括号的表示法会让HTML标签与ASP.N ...
- 修复 Xcode 错误 “The identity used to sign the executable is no longer valid”
如图: 解决方法来自:http://stackoverflow.com/questions/7088441/the-identity-used-to-sign-the-executable-is-no ...
- Flask download file vs django download file
Only difference is make_response and httpresponse. FLASK VERSION: from flask import make_response @a ...
- 求一些数字字符参数的和(Java)
一.思路 输入数字(字符型)参数: 将字符型强制转化为整数型: 求和: 输出: 二.流程图 三.源程序代码及结果
- sass进阶篇
@if @if 指令是一个 SassScript,它可以根据条件来处理样式块,如果条件为 true 返回一个样式块,反之 false 返回另一个样式块.在 Sass 中除了 @if 之,还可以配合 @ ...
- XML DOM学习
XML 文档对象模型定义访问和操作XML文档的标准方法. XML DOM 是 XML Document Object Model 的缩写,即 XML 文档对象模型. DOM 将 XML 文档作为一个树 ...
- hdu-2544-最短路(SPFA模板)
题目链接 题意很清晰,入门级题目,适合各种模板,可用dijkstra, floyd, Bellman-ford, spfa Dijkstra链接 Floyd链接 Bellman-Ford链接 SPFA ...