Monday, July 11, 2011

How to Un-encapsulate a root disk in Solaris ?

1. Boot from the 2nd disk and unencapusolare the 1st root disk.

ok> boot "/pci@9,600000/scsi@1,1/sd@0,0

2. Install boot block,

# cd /usr/platform/`uname i`/lib/fs/ufs
# installboot bootblk /dev/rdsk/c1t0d0s0
# installboot bootblk /dev/rdsk/c1t0d1s0

3. Collect the list of plexes associated with the 1st disk,

# vxprint -dg rootdg

4. Dis-associate the plexes (of 1st disk) frmo rootdg,

# vxplex -g rootdg dis var01
# vxplex -g rootdg dis rootvol01
# vxplex -g rootdg dis swapvol01

5. Run fsck on root and var filesystems on 1st disk,

# fsck /dev/rdsk/c1t0d0s0
# fsck /dev/rdsk/c1t0d0s6

6. Mount the root filesystem of 1st disk and modify the vfstab files,

# mount /dev/dsk/c1t0d0s0 /mnt
# cd /mnt/etc/
# cp -p system system.ddmmyy
# cp -p vfstab vfstab.ddmmyy
# cp -p vfstab.prevm vfstab
# edit vfstab and modify root/swap/var filesystems to contain c1t0 entry
# Comment the below line in /mnt/etc/system file
* rootdev...
* set vxio ...

7. Create the below file so that VXVM daemons won't get started while booting,

# touch /mnt/etc/vx/reconfig.d/state.d/install-db

8. Remove the below file so that the system knows that root disks are not encapsulated.

# rm /mnt/etc/vx/reconfig.d/state.d/root-done

9. Chagne the auto boot value to false.

# eeprom auto-boot?=false

After booting from disk slice (instead of VXVM), if you want to access other disk groups you can follow the below procedure.

1. start the VXIO daemon,
# vxiod set 10

2. Start vxconfigd in disabled mode,
# vxconfigd -d

3. Enable vxconfigd,
# vxdctl enable

4. Start all the volumes of the concerned DG,
# vxvol -g dg startall

5. Mount the corresponding filesystems.

No comments:

Post a Comment