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

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

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

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*

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

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.

最新文章

  1. ping 出现负值
  2. (原)android中的动画(三)之动画监听&页面切换动画
  3. TeamCity配置笔记
  4. ADF_Starting系列5_使用ADF开发富Web应用程序之维护User Interface(Part2)
  5. 关于Cygwin的x-Server的自动运行以及相关脚本修改
  6. thinkpad t440p 解决无线网卡驱动
  7. Samba 安全漏洞
  8. .Net规则引擎Biztalk,Workflow和CKRule的比较
  9. Oracle 单实例 2个service的问题
  10. 各种vpn协议介绍(重点介绍sslvpn的实现方式openvpn)
  11. NumberBox( 数值输入框) 组件
  12. 悼念传奇,约翰询问·纳什和他的妻子艾丽西亚致敬,创建一个传奇,爱数学
  13. Warning: Cannot modify header information - headers already sent by (output started at
  14. Spark技术内幕: Shuffle详解(一)
  15. nginx常用配置系列-虚拟主机
  16. Gym 101606B - Breaking Biscuits - [凸包+旋转卡壳][凸包的宽度]
  17. python的切片
  18. 剑指offer PART 2
  19. 雅克比迭代算法(Jacobi Iterative Methods) -- [ mpi , c++]
  20. SpringBoot之使用Scheduled做定时任务

热门文章

  1. HBase-存储-KeyValue格式
  2. 玲珑杯 第4次 String cut(暴力字符串)
  3. django 之补充
  4. CSS基础(滑动门,雪碧图,网页布局)
  5. numpy常用函数之randn
  6. Docker 介绍安装
  7. c#线程中下载文件到本地
  8. PHP用*号替代姓名除第一个字之外的字符
  9. uva11729 - Commando War(贪心)
  10. Android Volley完全解析(三),定制自己的Request