Clearing the unavailable disk device path and changing the boot disk path

Tuesday, January 11, 2011 at 10:46 PM
Clearing the unavailable disk device path and changing the boot disk path


1) old c1t0d0s* device still exist...

node# ls -lart /dev/rdsk/c*s2
lrwxrwxrwx 1 root root 47 Sep 22 2005 /dev/rdsk/c1t1d0s2 -> ../../devices/pci@1c,600000/scsi@2/sd@1,0:c,raw
lrwxrwxrwx 1 root root 47 Sep 22 2005 /dev/rdsk/c1t0d0s2 -> ../../devices/pci@1c,600000/scsi@2/sd@0,0:c,raw
lrwxrwxrwx 1 root root 46 Sep 22 2005 /dev/rdsk/c0t0d0s2 -> ../../devices/pci@1e,600000/ide@d/sd@0,0:c,raw
lrwxrwxrwx 1 root other 47 Dec 31 12:26 /dev/rdsk/c1t2d0s2 -> ../../devices/pci@1c,600000/scsi@2/sd@2,0:c,raw
node#

2) So can remove old c1t0d0s* device files using “devfsadm –Cv”. Below I’ve added the “-s” option to preview the actions...

cssv04# devfsadm -Cvs
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:a
devfsadm[2811]: verbose: removing file: /dev/dsk/c1t0d0s0
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:b
devfsadm[2811]: verbose: removing file: /dev/dsk/c1t0d0s1
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:c
devfsadm[2811]: verbose: removing file: /dev/dsk/c1t0d0s2
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:d
devfsadm[2811]: verbose: removing file: /dev/dsk/c1t0d0s3
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:e
devfsadm[2811]: verbose: removing file: /dev/dsk/c1t0d0s4
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:f
devfsadm[2811]: verbose: removing file: /dev/dsk/c1t0d0s5
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:g
devfsadm[2811]: verbose: removing file: /dev/dsk/c1t0d0s6
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:h
devfsadm[2811]: verbose: removing file: /dev/dsk/c1t0d0s7
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:a,raw
devfsadm[2811]: verbose: removing file: /dev/rdsk/c1t0d0s0
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:b,raw
devfsadm[2811]: verbose: removing file: /dev/rdsk/c1t0d0s1
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:c,raw
devfsadm[2811]: verbose: removing file: /dev/rdsk/c1t0d0s2
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:d,raw
devfsadm[2811]: verbose: removing file: /dev/rdsk/c1t0d0s3
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:e,raw
devfsadm[2811]: verbose: removing file: /dev/rdsk/c1t0d0s4
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:f,raw
devfsadm[2811]: verbose: removing file: /dev/rdsk/c1t0d0s5
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:g,raw
devfsadm[2811]: verbose: removing file: /dev/rdsk/c1t0d0s6
devfsadm[2811]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:h,raw
devfsadm[2811]: verbose: removing file: /dev/rdsk/c1t0d0s7

3)Remove old c1t0d0s* device files using “devfsadm –Cv”

node# devfsadm -Cv
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:a
devfsadm[12183]: verbose: removing file: /dev/dsk/c1t0d0s0
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:b
devfsadm[12183]: verbose: removing file: /dev/dsk/c1t0d0s1
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:c
devfsadm[12183]: verbose: removing file: /dev/dsk/c1t0d0s2
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:d
devfsadm[12183]: verbose: removing file: /dev/dsk/c1t0d0s3
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:e
devfsadm[12183]: verbose: removing file: /dev/dsk/c1t0d0s4
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:f
devfsadm[12183]: verbose: removing file: /dev/dsk/c1t0d0s5
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:g
devfsadm[12183]: verbose: removing file: /dev/dsk/c1t0d0s6
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:h
devfsadm[12183]: verbose: removing file: /dev/dsk/c1t0d0s7
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:a,raw
devfsadm[12183]: verbose: removing file: /dev/rdsk/c1t0d0s0
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:b,raw
devfsadm[12183]: verbose: removing file: /dev/rdsk/c1t0d0s1
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:c,raw
devfsadm[12183]: verbose: removing file: /dev/rdsk/c1t0d0s2
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:d,raw
devfsadm[12183]: verbose: removing file: /dev/rdsk/c1t0d0s3
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:e,raw
devfsadm[12183]: verbose: removing file: /dev/rdsk/c1t0d0s4
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:f,raw
devfsadm[12183]: verbose: removing file: /dev/rdsk/c1t0d0s5
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:g,raw
devfsadm[12183]: verbose: removing file: /dev/rdsk/c1t0d0s6
devfsadm[12183]: verbose: removing file: /devices/pci@1c,600000/scsi@2/sd@0,0:h,raw
devfsadm[12183]: verbose: removing file: /dev/rdsk/c1t0d0s7
node#

4) Check the current the deviece status

node# ls -lart /dev/rdsk/c*s2
lrwxrwxrwx 1 root root 47 Sep 22 2005 /dev/rdsk/c1t1d0s2 -> ../../devices/pci@1c,600000/scsi@2/sd@1,0:c,raw
lrwxrwxrwx 1 root root 46 Sep 22 2005 /dev/rdsk/c0t0d0s2 -> ../../devices/pci@1e,600000/ide@d/sd@0,0:c,raw
lrwxrwxrwx 1 root other 47 Dec 31 12:26 /dev/rdsk/c1t2d0s2 -> ../../devices/pci@1c,600000/scsi@2/sd@2,0:c,raw
node#

5)EEPROM is still pointing to the hardware path of c1t0d0 as the primary boot device...

node# eeprom | egrep '^(boot|nvram|devalias)'
boot-command=boot
boot-file: data not available.
boot-device=primary secondary
nvramrc=devalias primary /pci@1c,600000/scsi@2/disk@0,0:a
devalias secondary /pci@1c,600000/scsi@2/disk@1,0:a
node#

6) So reset devalias devices to primary (c1t1d0) then secondary (c1t2d0)...

node# eeprom 'nvramrc=devalias primary /pci@1c,600000/scsi@2/disk@1,0:a devalias secondary /pci@1c,600000/scsi@2/disk@2,0:a'

node# eeprom | egrep '^(boot|nvram|devalias)'
boot-command=boot
boot-file: data not available.
boot-device=primary secondary
nvramrc=devalias primary /pci@1c,600000/scsi@2/disk@1,0:a devalias secondary /pci@1c,600000/scsi@2/disk@2,0:a
node#

7) Copy the ufs boot block to the newly replaced c1t2d0 disk...

installboot /usr/platform/SUNW,Sun-Fire-V240/lib/fs/ufs/bootblk /dev/rdsk/c1t2d0s0

Solaris | Powered by Blogger | Entries (RSS) | Comments (RSS) | Designed by MB Web Design | XML Coded By Cahayabiru.com