break mirror

SCOPE
The scope of this document is to have a full rollback in case patching a system fails. Most of our systems are installed with Solstice Disksuite. We mirror our bootdisks with this software. The rollback exists of splitting the mirror and keep one of the submirrors as it is before patching. In this way we can in case of emergency boot from the splitted mirror.
Current situation
We have a system which has mirrored boot partitions.
Before you start:
Check the status of the mirrors, type metastat
All the boot partitions should be in sync and mirrored
Draw a picture of how the current situation is. (example below)

Make a rollback
To have a roll back we are going to split the mirror. In the example above we have a disksuite disk d100 which exists of two submirros. Each of those two submirrors is a slice on a physical disk. Now we are going to split of d102 from d100 and connect it to a new mirror.

Type: metadetach d100 d102
Now to connect the submirror again type: metainit -f d10 -m d102

Make the mirror bootable and boot from it
To be able to boot from d10 we need to do some steps.

Step 1
– put a special block on the disk:
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t0d0s0
Where /dev/rdsk/c1t0d0s0 should be the physical slice where the mirror of the root is.

Step 2
Beware that the mirror is broken and that you have to edit two files on the disk which used to be the mirror of the root. You have to edit two files.

mount /dev/md/dsk/d10 /mnt
vi /mnt/etc/vfstab
edit the line where is says that / is d100 to d10 (twice)
find out real path to the devices type: ls -l /dev/md/dsk/d10
Output:
lrwxrwxrwx 1 root other 37 Jun 22 11:39 /dev/md/dsk/d10 -> ../../../devices/pseudo/md@0:0,10,blk
vi /mnt/etc/system
search for the line starting with “rootdev”
this line: rootdev:/pseudo/md@0:0,100,blk
should become:
rootdev:/pseudo/md@0:0,10,blk

Step 3
Check if there is an alias to the disk where you want to boot from.
Create an nvram alias to allow booting from the backup disk.
# ls -l /dev/rdsk/c1t0d0s0
lrwxrwxrwx 1 root root 54 Aug 5 20:35 /dev/rdsk/c0t11d0s0 -> ../../devices/sbus@3,0/SUNW,fas@3,8800000/sd@b,0:a,raw

The device path to be used for the alternate boot device is /sbus@3,0/SUNW,fas@3,8800000/sd@b,0:a

Shut down the machine and at the ok prompt type
ok nvalias backup /sbus@3,0/SUNW,fas@3,8800000/sd@b,0:a

ok boot backup.

Bookmark de permalink.

Geef een reactie

Je e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *