Boot Solaris 10 from detached root mirrors

I recently ran some patching on a Solaris 10 server and as per normal procedure I detached the LVM root disk mirrors first to preserve the pre-patching copy of the OS.

During the patching, I ran into some issues which I managed to resolve and completed the patching. However, I was looking around to see if there is any online documents which state the procedure to get the system to boot from the detached sub-mirrors in the event of the roll-back becoming necessary.

Does anybody know of such a procedure to force Solaris 10 and Solaris10 x86 to boot from a detached set of mirrors?

In SPARC, at the OK prompt "boot <New boot disk>" (ie Alias of the mirror)

Assuming that you have made the mirror bootable (bootblk)

That's fine but the SVM config on the mirror disk still points to the old config when it was a mirror pair.

The bit that I would like to know is how do you reconfigure SVM and the system files so that when the system comes up off the secondary disk, it does not try to boot from the OS on the old primary disk?

Has nobody ever put together a step-by-step procedure on how to do this?

Overall, you have to take SVM out of the picture. You'll need to make the changes to the /etc/vfstab file to boot off of the device name. Also, changes will need to be made in /etc/system. Then when you reboot the server from the "ok" prompt you can use the alias of the root mirror.

I agree with what the guys just said.

Easy steps:

  1. boot from CDROM in single user mode.

  2. edit /etc/vfstab and put the root disk as a raw device again, put the disk you want to boot from.

  3. remove the /etc/system entry of the SVM (or better commented ). It's one line usually towards the of the file, starts like this

  • Begin MD
  • End MD

(make sure you know which disk you are mounting and editing, as you have two copies of the files, one in each disk).

then from the OK prompt, just boot from the second disk.

---------- Post updated at 12:04 PM ---------- Previous update was at 12:03 PM ----------

if you mirrored using SVM, then you don't need to install bootblk manually. When you backup or dump the root filesystem, then you need to install bootblk. But with SVM root mirrors, this step is not required.

Here the steps I follow

  • breaking the mirrors
metadetach d10 d12
metadetach d30 d32
metadetach d40 d42
  • fsck the detached mirrors
fsck /dev/md/rdsk/d12
fsck /dev/md/rdsk/d32
fsck /dev/md/rdsk/d42
  • Mount detached to modify /etc/system and /etc/vfstab
mount /dev/md/dsk/d12 /mnt
  • Remove following line from /mnt/etc/system
rootdev:/pseudo/md@0:0,10...
  • change following lines in /mnt/etc/vfstab
 /dev/md/dsk/d10  /dev/md/rdsk/d10  /     ufs  1  no
  /dev/md/dsk/d30  /dev/md/rdsk/d30  /var  ufs  1  no
  /dev/md/dsk/d40  /dev/md/rdsk/d40  /opt  ufs  1  no

To

 /dev/dsk/c2t500000E01998D020d0s0 /dev/rdsk/c2t500000E01998D020d0s0 /    ufs 1 no
  /dev/dsk/c2t500000E01998D020d0s3 /dev/rdsk/c2t500000E01998D020d0s3 /var ufs 1 no
  /dev/dsk/c2t500000E01998D020d0s4 /dev/rdsk/c2t500000E01998D020d0s4 /opt ufs 1 no
  • Umount the Filesystem
umount /mnt
  • Shut down the server for patching
  • Patch the server
  • Reboot the server
  • a few days later attach the mirrors again

When the something happen during patching just boot from the mirror.