Unencapsulate SVM root mirror (ZT)

http://www.seedsofgenius.net/solaris/quick-reference-unencapsulate-svm-root-mirror

Often times administrators must boot a Solaris from alternate media in single user mode (failsafe, cd/dvdrom, or network image) in order to make repairs to the installed OS. In this environment, no Solaris Volume Manager (SVM) module is loaded, so if the OS is mirrored it is impossible to work on the installed OS without de-synchronizing the mirrors. Attempting to boot or run Solaris on descynchronized mirrors is extremely unstable and it may cause kernel panics or worse, data corruption.

The supported method for dealing with this is to make changes to only one side of the mirror, then unencapsulate the root mirror before rebooting/resyncing.

1. Mount the root slice on one side of the mirror and make necessary repairs

# mount /dev/dsk/c0t0d0s0 /a

2. Backup the SVM configuration

# cp /a/etc/vfstab /a/etc/vfstab.svm
# cp /a/etc/system /a/etc/system.svm

3. Update /etc/vfstab and /etc/system to boot from plain slices on the repaired side of the mirror

# vi /a/etc/vfstab
(return all md devices to plain slices)

# vi /a/etc/system
(comment out rootdev line)

4. Reboot

# init 0
ok boot -r

5. Once the system is up, split the metadevice

# metadetach <mirror device> <secondary submirror>
(repeat for all mirrored slices)

6. Restore the configuration files in order to re-encapsulate, so the system boots on single-disk (single sub-mirror) mirror metadevices

# mv /etc/system.svm /etc/system
# mv /etc/vfstab.svm /etc/vfstab

7. Reboot

# init 6

8. After reboot, sync the mirrors

# metattach <mirror device> <secondary submirror>
(repeat for all mirror slices)

posted @ 2013-08-05 15:10  生命的力量在于不顺从  阅读(334)  评论(0编辑  收藏  举报