We are going to discuss how to unencapsulate the rootdisk in vxvm on Solaris. Have you ever in need of rootdisk unencapsulation ever? the situation may be anything like vxvm is no more bootable or you have the plan to migrate from VxVM to SVM or any other situation where you need to un-encapsulate root disk.
An un-encapsulation simply refers to the reverse process of encapsulation. This is just to make it clear. Encapsulation is used to protect data on disk.
So let’s see how we can achieve considering the fact that you have already informed about the activity to a related party and you have approved time to perform this activity. This is the manual procedure of rootdisk unencapsulation in vxvm. This is applicable to VxVM version 4.0 onward.
How to unencapsulate the rootdisk in Solaris
1.First of all you need to bring the server to the OK prompt. # shutdown -y -g0 -i0 2. Boot server in single-user mode using any option like below. Use any one method which is feasible for you. ok> boot cdrom -s ok> boot disk -s ok> boot net -s 3.Run fsck on root file system. # fsck -y /dev/rdsk/c1t0d0s0 4. Mount the root filesystem on /a # mount /dev/dsk/c1t0d0s0 /a 5. Backup system file # cp /a/etc/system /a/etc/system.vxvm 6. vi /a/etc/system and remove the following 2 entries rootdev:/pseudo/vxio@0:0 set vxio:vol_rootdev_is_volume=1 7. Backup vfstab # cp /a/etc/vfstab /a/etc/vfstab.vxvm 8. Restore vfstab without veritas # cp /a/etc/vfstab.prevm /a/etc/vfstab 9. Remove root-done # rm /a/etc/vx/reconfig.d/state.d/root-done 10. Recreate install-db # touch /a/etc/vx/reconfig.d/state.d/install-db 11. Unmount /a # umount /a
We are almost done till now but hold on we have to perform the same on mirror disk as well as till now we have made changes on rootdisk only.
12. Run same steps on mirror disk # fsck -y /dev/rdsk/c1t1d0s0 # mount /dev/dsk/c1t1d0s0 /a # cp /a/etc/system /a/etc/system.vxvm # vi /a/etc/system and remove the following 2 entries rootdev:/pseudo/vxio@0:0 set vxio:vol_rootdev_is_volume=1 # cp /a/etc/vfstab /a/etc/vfstab.vxvm # cp /a/etc/vfstab.prevm /a/etc/vfstab # rm /a/etc/vx/reconfig.d/state.d/root-done # touch /a/etc/vx/reconfig.d/state.d/install-db # umount /a So now we have done same changes to both rootdisk as well as mirror disk. 13. Run fsck again on root and mirror disk finally. # fsck -y /dev/rdsk/c1t0d0s0 & # fsck -y /dev/rdsk/c1t1d0s0 14.sync;sync;reboot
15.Validate server-status is once available. The alternate procedure to unencapsulate rootdisk in vxvm by vendor script is as follows. Run vxunroot command to break the encapsulation.
That,s it about how to unencapsulate the rootdisk in vxvm. I hope you enjoyed it and thanks for reading the article until the end.