Hi all
I wish to mirror for the root disk, but last time i do, make the server cannot boot up. So this time, hope you guys can assist me on it. =)
At the last code, is the step i wish to do. Please help to check and correct me if got any wrong.
root@leo # format </dev/null
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848>
/pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a73c58,0
1. c1t1d0 <SEAGATE-ST314670FSUN146G-0354 cyl 14087 alt 2 hd 24 sec 848>
/pci@9,600000/SUNW,qlc@2/fp@0,0/ssd@w21000011c6a75d1b,0
......
......
Specify disk (enter its number):
I will like to mirror this two disk. Currently the OS is installed in the c1t0d0
root@leo # vi /etc/vfstab
"/etc/vfstab" 13 lines, 460 characters
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
#/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes -
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c1t0d0s1 - - swap - no -
/dev/dsk/c1t0d0s0 /dev/rdsk/c1t0d0s0 / ufs 1 no
-
swap - /tmp tmpfs - yes -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
sharefs - /etc/dfs/sharetab sharefs - no -
~
Below is the c1t0d0
Warning: Current Disk has mounted partitions.
/dev/dsk/c1t0d0s0 is currently mounted on /. Please see umount(1M).
/dev/dsk/c1t0d0s1 is currently used by swap. Please see swap(1M).
partition> p
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 11670 113.26GB (11671/0/0) 237528192
1 swap wu 11673 - 14086 23.43GB (2414/0/0) 49129728
2 backup wm 0 - 14086 136.71GB (14087/0/0) 286698624
3 - wu 0 - 14086 136.71GB (14087/0/0) 286698624
4 - wu 11671 - 11672 19.88MB (2/0/0) 40704
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
Below is the c1t1d0
partition> p
Current partition table (original):
Total disk cylinders available: 14087 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 2 - 11672 113.26GB (11671/0/0) 237528192
1 swap wu 11673 - 14086 23.43GB (2414/0/0) 49129728
2 backup wu 0 - 14086 136.71GB (14087/0/0) 286698624
3 - wu 2 - 14086 136.69GB (14085/0/0) 286657920
4 - wu 0 - 1 19.88MB (2/0/0) 40704
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
Is it my below step correct ? kindly advise me =)
# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
# metadb -a -f -c2 /dev/dsk/c1t0d0s4 /dev/dsk/c1t1d0s4
Mirror the root slice.
# metainit -f d10 1 1 c1t0d0s0
# metainit -f d20 1 1 c1t1d0s0
# metainit d0 -m d10
# metaroot d0
Mirror the swap slice.
# metainit -f d11 1 1 c1t0d0s1
# metainit -f d21 1 1 c1t1d0s1
# metainit d1 -m d11
Update /etc/vfstab
Reboot the system.
# metaroot d0
# lockfs -fa
# init 6
After reboot
# metattach d0 d20
# metattach d1 d21