How to Split a Root Mirrored With Solaris Volume Manager Prior to Updating SoftwareEnda O'Connor, April 2009 This article outlines the correct way to split a Solaris Volume Manager mirror prior to updating the software through, for instance, upgrades or software updates (patches). The following procedures should work with all Solaris releases except for How to Mount a Solaris Volume Manager Mirror While Booted From Media, which applies only to the Solaris 10 OS. The examples below were conducted on a Sun Fire x4200 server. This article covers the following topics:
How to Split the Mirror Before the Software Update1. First, determine the layout of the root file system: root@patchtest-x4200-2 # df -k / Filesystem kbytes used avail capacity Mounted on /dev/md/dsk/d10 10085921 1041301 8943761 11% / root@patchtest-x4200-2 # metastat -p d10 d10 -m d11 d12 1 d11 1 1 c0t2d0s0 d12 1 1 c0t3d0s0 2. Remove the mirror that is not being upgraded (for instance, in the example in Step 1,
root@patchtest-x4200-2 # metadetach d10 d12 d10: submirror d12 is detached 3. Revert to booting off the physical device that is being upgraded ( root@patchtest-x4200-2 # metaroot c0t2d0s0 4. Verify that root@patchtest-x4200-2 # grep c0t2d0s0 /etc/vfstab /dev/dsk/c0t2d0s0 /dev/rdsk/ / ufs 1 no - root@patchtest-x4200-2 # grep d10 /etc/vfstab root@patchtest-x4200-2 # 5. Reboot the system (which will now boot from How to Rebuild the Mirror After the Software Update1. Redefine the boot device to #metaroot d10 2. Reboot the system. 3. Add back the mirror: #metaattach d10 d12 4. Let the sync complete prior to rebooting; examine How to Mount a Solaris Volume Manager Mirror While Booted From MediaIf, for any reason, it becomes necessary to mount a Solaris Volume Manager mirrored metadevice while booted from media,
for example, using Note: This applies only to the Solaris 10 Operating System. In this scenario, we need to boot off alternate media and mount the Solaris Volume Manager metadevices, because the mirror
was not split before it became necessary to boot off the alternate media. In this case, we need to do some manual work to enable us to
mount the So, assume the root disk is laid out as follows:
The following was the state of the metadevices prior to booting off media: root@oyster # metastat -p d10 d10 -m d11 d12 1 d11 1 1 c0t2d0s0 d12 1 1 c0t3d0s0 root@oyster # metastat -p d20 d20 -m d21 d22 1 d21 1 1 c0t2d0s1 d22 1 1 c0t3d0s1 1. First, boot from media, for example: #boot net -s 2. Now mount one of the subdisks read-only, so that you cannot accidentally damage the subdisk. In this example, assume that the underlying disk is still accessible and data has not been corrupted. # mount -o ro /dev/dsk/c0t0d0s0 /a 3. Then set up the current booted environment so that it can use Solaris Volume Manager: # cp /a/kernel/drv/md.conf /kernel/drv/md.conf # umount /a 4. Update the Solaris Volume Manager driver to load the configuration: # update_drv -f md Note: Ignore any error messages from 5. Now run # metainit -r 6. If you have mirrors, you should run 7. After the sync has completed, then you can proceed to mount the meta devices: # mount /dev/md/dsk/d10 /a # mount /dev/md/dsk/d20 /a/var Now you have the Solaris Volume Manager mirror mounted under the mountpoint For More InformationHere are some additional resources:
Comments (latest comments first)Discuss and comment on this resource in the BigAdmin Wiki
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License. |
BigAdmin SubscriptionsBigAdmin Areas
BigAdmin Sun Center
BigAdmin Topics | ||||