Monday, July 25, 2016

Mirror root-disk Replacement online in HP-Ux


Caution : Before starting, make sure that the remaining disk is really
bootable. Use vxvmboot and lifls command to verify if the disk is bootable. Also, make sure  recent ignite-ux recovery image is taken and a valid backup of your data.

1) Without removing mirror

# vxdisk -o alldgs list | grep root

# setboot
Primary bootpath : 2/0/1/0/0.1.0
Alternate bootpath : 2/0/1/0/0.0.0

==> We would like to replace c0t1d0


2) Remove the disk from kernel

# vxdg -k -g rootdg rmdisk rootdisk01
# vxdisk -o alldgs list | grep root

3. Pull out the removed disk and put in the replacement disk.

4. Run vxdisksetup on recently inserted disk :

# /etc/vx/bin/vxdisksetup -iB c0t1d0
# vxdisk -o alldgs list | grep root

even if the new disk doesn't show up in the list you can go ahead.

5. Add replaced disk back in rootdg

# vxdg -k -g rootdg adddisk rootdisk01=c0t1d0
# vxdisk -o alldgs list | grep rootdg

6. Check if the mirrordisk plexes are still in status DISABLED RECOVER

# vxprint -thg rootdg

7. Recover mirror

# vxrecover -b -g rootdg rootdisk01

and check with vxtask list if the job is finished

8. Use vxprint to check if all the plexes are ENABLED ACTIVE

# vxprint -thg rootdg


9. Only when step seven is finished, make the replacement mirrordisk bootable

# /usr/lib/vxvm/bin/vxbootsetup rootdisk01

# vxvmboot -v /dev/rdsk/c0t1d0 

# lifls -l /dev/rdsk/c0t1d0

1 comment: