PROCEDURE OF MIRRORING
e.g. root disk=c0t0d0 mirror disk=c0t1d0
1) Create 7th slice (e.g c0t0d0s7 100mb)
2) prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
3) metadb -afc 3 c0t0d0s7 c0t1d0s7
4) metadb (to check whether metadb is created or not)
5) metainit -f d11 1 1 c0t0d0s0
metainit -f d12 1 1 c0t1d0s0
metainit -f d21 1 1 c0t0d0s1
metainit -f d22 1 1 c0t1d0s1
metainit -f d31 1 1 c0t0d0s3
metainit -f d32 1 1 c0t1d0s3
metainit -f d41 1 1 c0t0d0s4
metainit -f d42 1 1 c0t1d0s4
metainit -f d51 1 1 c0t0d0s5
metainit -f d52 1 1 c0t1d0s5
metainit -f d61 1 1 c0t0d0s6
metainit -f d62 1 1 c0t1d0s6
6) metastat -p ( to check)
7) metainit d10 -m d11
metainit d20 -m d21
metainit d30 -m d31
metainit d40 -m d41
metainit d50 -m d51
metainit d60 -m d61
8) Take Backup of system and vfstab files
cp -p /etc/system /etc/system.org
cp -p /etc/vfstab /etc/vfstab.org
9) metaroot d10 (Modifies /"root" entry in vfstab)
lockfs -af
It will do changes in /etc/system file & /etc/vfstab file
In vfstab file /dev/md/dsk/d10 will appear & make manual changes to
replace /dev/dsk/c0t0d0s1 by /dev/md/dsk/d20.
10) Enter the following line in system file
set md:mirrored_root_flag=1
11) init 6
12) dumpadm -d swap
13) metattach d10 d12
metattach d20 d22
metattach d30 d32
metattach d40 d42
metattach d50 d52
metattach d60 d62
14) To check mirroring progress give
# metastat -i | grep %
15) eeprom "use-nvramrc?=true"
eeprom boot-device="rootdisk rootmirror net"
eeprom "nvramrc=devalias rootdisk /pci@0/pci@0/pci@2/scsi@0/disk@0,0 devalias rootmirror /pci@0/pci@0/pci@2/scsi@0/disk@1,0"
1) Create 7th slice (e.g c0t0d0s7 100mb)
2) prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
3) metadb -afc 3 c0t0d0s7 c0t1d0s7
4) metadb (to check whether metadb is created or not)
5) metainit -f d11 1 1 c0t0d0s0
metainit -f d12 1 1 c0t1d0s0
metainit -f d21 1 1 c0t0d0s1
metainit -f d22 1 1 c0t1d0s1
metainit -f d31 1 1 c0t0d0s3
metainit -f d32 1 1 c0t1d0s3
metainit -f d41 1 1 c0t0d0s4
metainit -f d42 1 1 c0t1d0s4
metainit -f d51 1 1 c0t0d0s5
metainit -f d52 1 1 c0t1d0s5
metainit -f d61 1 1 c0t0d0s6
metainit -f d62 1 1 c0t1d0s6
6) metastat -p ( to check)
7) metainit d10 -m d11
metainit d20 -m d21
metainit d30 -m d31
metainit d40 -m d41
metainit d50 -m d51
metainit d60 -m d61
8) Take Backup of system and vfstab files
cp -p /etc/system /etc/system.org
cp -p /etc/vfstab /etc/vfstab.org
9) metaroot d10 (Modifies /"root" entry in vfstab)
lockfs -af
It will do changes in /etc/system file & /etc/vfstab file
In vfstab file /dev/md/dsk/d10 will appear & make manual changes to
replace /dev/dsk/c0t0d0s1 by /dev/md/dsk/d20.
10) Enter the following line in system file
set md:mirrored_root_flag=1
11) init 6
12) dumpadm -d swap
13) metattach d10 d12
metattach d20 d22
metattach d30 d32
metattach d40 d42
metattach d50 d52
metattach d60 d62
14) To check mirroring progress give
# metastat -i | grep %
15) eeprom "use-nvramrc?=true"
eeprom boot-device="rootdisk rootmirror net"
eeprom "nvramrc=devalias rootdisk /pci@0/pci@0/pci@2/scsi@0/disk@0,0 devalias rootmirror /pci@0/pci@0/pci@2/scsi@0/disk@1,0"