Thursday, January 1, 2009

Un-Mirrored root Volume

Check the root mirror status
#metastat d0
this command will update /etc/vfstab and /etc/system file for root disk
#metaroot /dev/dsk/c0t0d0s0
#reboot
....
#metaclear -r d0
#metaclear d20

Creating Mirror for mounted usr volume

#metainit -f d12 1 1 c0t0d0s3
#metainit d22 1 1 c0t1d0s3
#metainit d2 -m d12
#reboot
after reboot you have to run following command
#metattach d2 d22
After created mirror disk for usr volume you need to edit the /etc/vfstab file entry
#vi /etc/vfstab
/dev/md/dsk/d2 /dev/md/rdsk/d2 /usr ufs 1 yes -
:wq!

Creating Mirror for mounted root volume

#metainit -f d1 1 1 c0t0d0s0
#metainit d2 1 1 c0t1d0s0
#metainit d0 -m d1
#metaroot d0 (this will update /etc/vfstab & /etc/system file)
#metaroot d0
#
lockfs -fa
#reboot
after reboot you have to run following command
#metattach d0 d2
After created mirror disk for root volume you need to configure alternate boot path for this server.in case the first disk crashed the system will boot from second disk automatically.to find the physical path
#ls -l /dev/rdsk/c0t1d0s0
devices/sbus@1,f8000000/esp@1,200000/sd@3,0:a
goto OK prompt
create alias for second disk
ok: nvalias backup-root /sbus@1,f8000000/esp@1,200000/sd@3,0:a
ok:printenv boot-root
ok:
setenv boot-device disk backup-root net
ok>nvstore
for manual boot
ok:boot backup_root