Solaris Root mirroring Easy way

Hey Everyone,

Something from my old notes: Root mirroring in Solaris:

Root Mirroring

Root disk – c5t500000E010F08540d0
Mirror disk – c5t500000E010EFE890d0

Transfer the partition table
prtvtoc /dev/rdsk/c5t500000E010F08540d0s2 | fmthard -s – /dev/rdsk/c5t500000E010EFE890d0s2

Creation of meta databases
metadb -c 2 -a -f /dev/dsk/c5t500000E010F08540d0s7 /dev/dsk/c5t500000E010EFE890d0s7

Initialising the meta devices
metainit -f d10 1 1 c5t500000E010F08540d0s0
metainit d20 1 1 c5t500000E010EFE890d0s0
metainit -f d17 1 1 c5t500000E010F08540d0s7
metainit d27 1 1 c5t500000E010EFE890d0s7

Creating the mirrors
metainit -f d0 -m d10
metainit -f d7 -m d17

#Activate root meta
metaroot d0

Modify the vfstab for other metadevice entries for d7

Modify the system file

echo “set md:mirrored_root_flag=1” >> /etc/system

Modify the OBP boot device to boot with the mirror
eeprom “nvramrc=devalias mirror /scsi_vhci/ssd@g500000e010f08540:a devalias mirror-a /scsi_vhci/ssd@g500000e010f08541:a”
Install the boot block on the mirror disk
installboot /usr/platform/sun4u/lib/fs/ufs/bootblk /dev/rdsk/c5t500000E010EFE890d0s0

Attaching the mirror disk sub mirrors
metattach d0 d20
metattach d7 d27

metasync

———————–
Ruchir Gaur
“In Your life, There is no such a thing as you can do it or you can’t, but it’s a matter of ‘doing it or not doing it.’ “

One Reply to “Solaris Root mirroring Easy way”

  1. Hi, just required you to know I he added your site to my Google bookmarks due to your layout. But seriously, I believe your internet site has 1 in the freshest theme I??ve came across. It extremely helps make reading your blog significantly easier.

Leave a Reply

Your email address will not be published. Required fields are marked *