Making dual boot disk configuration with Solaris SVM
Posted on March 26th, 2010
We need to create RAS configuration for boot disks in the Solaris 10 U8 using SVM.
The server is Sun M4000 with 2 internal 146G SAS disks.
Installing Solaris we choose the following file system layout
sh-3.00# df -h Filesystem size used avail capacity Mounted on /dev/dsk/c0t0d0s0 16G 4.3G 11G 28% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 113G 1.8M 113G 1% /etc/svc/volatile objfs 0K 0K 0K 0% /system/object sharefs 0K 0K 0K 0% /etc/dfs/sharetab fd 0K 0K 0K 0% /dev/fd /dev/dsk/c0t0d0s3 16G 426M 15G 3% /var swap 113G 32K 113G 1% /tmp swap 113G 72K 113G 1% /var/run swap 113G 0K 113G 0% /dev/vx/dmp swap 113G 0K 113G 0% /dev/vx/rdmp /dev/dsk/c0t0d0s5 7.9G 8.0M 7.8G 1% /space2 /dev/dsk/c0t0d0s4 9.6G 1.1G 8.4G 12% /opt /dev/dsk/c0t0d0s7 65M 1.0M 57M 2% /space /dev/odm 0K 0K 0K 0% /dev/odm
We are going to create boot disk mirror.
bash-3.00# umount /space bash-3.00# umount /space2 bash-3.00# metadb -a -f -c 2 c0t0d0s7 bash-3.00# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2 fmthard: New volume table of contents now in place. bash-3.00# metadb -a -c 2 c0t1d0s7
Avoid problems with metadb quorum during panic reboots with 2-disks boot mirror.
echo set md:mirrored_root_flag=1 >> /etc/system
Create the volumes:
bash-3.00# swap -l swapfile dev swaplo blocks free /dev/dsk/c0t0d0s1 32,9 16 182150384 182150384 bash-3.00# metainit -f d10 1 1 c0t0d0s0 d10: Concat/Stripe is setup bash-3.00# metainit -f d11 1 1 c0t0d0s1 d11: Concat/Stripe is setup bash-3.00# metainit -f d13 1 1 c0t0d0s3 d13: Concat/Stripe is setup bash-3.00# metainit d20 1 1 c0t1d0s0 d20: Concat/Stripe is setup bash-3.00# metainit d21 1 1 c0t1d0s1 d21: Concat/Stripe is setup bash-3.00# metainit d23 1 1 c0t1d0s3 d23: Concat/Stripe is setup bash-3.00# metainit d0 -m d10 d0: Mirror is setup bash-3.00# metainit d1 -m d11 d1: Mirror is setup bash-3.00# metainit d3 -m d13 d3: Mirror is setup bash-3.00# metaroot d0 bash-3.00# cp /etc/vfstab /etc/vfstab.tmp bash-3.00# cat /etc/vfstab.tmp | \ > sed s,/dev/dsk/c0t0d0s1,/dev/md/dsk/d1, | \ > sed s,/dev/dsk/c0t0d0s3,/dev/md/dsk/d3, | \ > sed s,/dev/rdsk/c0t0d0s3,/dev/md/rdsk/d3, > /etc/vfstab bash-3.00# ls -l /dev/rdsk/c0t1d0s0 bash-3.00# ls -l /dev/rdsk/c0t0d0s0 lrwxrwxrwx 1 root root 64 Mar 10 17:59 /dev/rdsk/c0t1d0s0 -> ../../devices/pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@1,0:a,raw lrwxrwxrwx 1 root root 64 Mar 10 17:59 /dev/rdsk/c0t0d0s0 -> ../../devices/pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0:a,raw bash-3.00# init 0
next, create nvram aliases, replace “sd” by “disk”.
{0} ok nvalias bootdisk /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/disk@0,0:a
{0} ok nvalias bootmirror /pci@0,600000/pci@0/pci@8/pci@0/scsi@1/disk@1,0:a
{0} ok setenv boot-device bootdisk bootmirror
boot-device = bootdisk bootmirror
{0} ok bootCreate dedicated dump device not mirrored by SVM:
dumpadm -d /dev/dsk/c0t0d0s5
Attach submirrors.
bash-3.00# metattach d0 d20 d0: submirror d20 is attached bash-3.00# metattach d1 d21 d1: submirror d21 is attached bash-3.00# metattach d3 d23 d3: submirror d23 is attached bash-3.00# metattach d4 d24 d4: submirror d24 is attached bash-3.00#
Note: in the case of mirrored c0t0d0s0 there is no need to run installboot to install boot blocks on it.
Filed under Solaris |