Working with SVM disks when booted from CDROM/DVD/Net/Failsafe
NOTE: If site has already modified one side of the mirror — DO NOT use this procedure, you must un-encapsulate out of SVM
as the disks are no longer in sync. If system went down hard, I would also not recommend this procedure
but if site wants to modify a file or update boot-archive….good procedure to use
If you want to make changes while disks are under SVM and you want to modify both sides of the metadevice
use the following procedure (either booted failsafe, cdrom, net -s)
1) Boot to failsafe or cdrom or net example is in failesafe
Rebooting with command: boot -F failsafe
Boot device: /pci@9,600000/SUNW,qlc@2/fp@0,0/disk@w21000004cf960bd4,0:a File and args: -F failsafe
SunOS Release 5.10 Version Generic_141444-09 64-bit
Copyright 1983-2009 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Configuring devices.
Searching for installed OS instances…
/dev/dsk/c1t0d0s0 is under md control, skipping.
/dev/dsk/c1t1d0s0 is under md control, skipping.
No installed OS instance found.
Starting shell.
*You cannot use the metastat -p command to determine the primary submirror when
the system is booted in failsafe mode. Information about which slice is the primary submirror is printed to the console during the failsafe boot process. You can alternately use this method to determine the primary submirror.
2) Mount the primary submirror in read only mode.
For example:
# mount -o ro /dev/dsk/c1t0d0s0 /a
3) Copy the md.conf from the primary submirror to the failsafe miniroot
* this is in tmp and does not effect failsafe on the OS disk
# cp /a/kernel/drv/md.conf /kernel/drv/
4) Update the md driver
# update_drv -f md
devfsadm: mkdir failed for /dev 0x1ed: Read-only file system (don’t worry about this message)
#
* At this point meta commands are now functional
*metastat will will show the root mirror "Needs maintenance"
5) Unmount the submirror
# cd /
# umount /a
6) List the meta devices
Example:
# metastat -p
d0 -m d1 d2 1
d1 1 1 c1t0d0s0
d2 1 1 c1t1d0s0
d10 -m d11 d12 1
d11 1 1 c1t0d0s1
d12 1 1 c1t1d0s1
*d0 is the root mirror AKA upper level meta device
7) Sync the root mirror
# metasync d0
8) Mount the root mirror
# mount /dev/md/dsk/d0 /a
the OS is now under SVM and you can perform any action you want
if you want to fsck the metadevice, cd /, umount /a
and run fsck /dev/md/rdsk/d0
if you have to update boot archive — remount metadevice to /a
9) Recreate the boot_archive using the force option (-f)
# bootadm update-archive -f -v -R /a
forced update of archive requested
cannot find: /a/etc/cluster/nodeid: No such file or directory
cannot find: /a/etc/mach: No such file or directory
Creating boot_archive for /a
updating /a/platform/sun4u/boot_archive
15+0 records in
15+0 records out
#
*Process complete
# cd /
# umount /a
10) Reboot to the mirrored environment
# reboot OR init 0 to boot from OK prompt
-
Archives
- August 2012 (1)
- February 2012 (1)
- December 2011 (1)
- August 2011 (2)
- July 2011 (1)
- June 2011 (1)
- May 2011 (3)
- April 2011 (2)
- February 2011 (1)
- January 2011 (1)
- January 2010 (1)
- December 2009 (1)
-
Categories
-
RSS
Entries RSS
Comments RSS