c0t0d0 c0t1d0
1、首先成为root
#调整第二块硬盘(c0t1d0)的文件分区表调整为和引导盘一致
prtvtoc /dev/rdsk/c0t0d0s2|fmthard -s - /dev/rdsk/c0t1d0s2
2、创建metadb文件
#metadb -a -c 4 -f c0t0d0s6
#metadb -a -c 4 -f c0t1d0s6
3、 创建raid0卷
#metainit -f d11 1 1 c0t0d0s0
#metainit -f d21 1 1 c0t0d0s1
#metainit -f d41 1 1 c0t0d0s3
#metainit -f d81 1 1 c0t0d0s7
#metainit d12 1 1 c0t1d0s0
#metainit d22 1 1 c0t1d0s1
#metainit d42 1 1 c0t1d0s3
#metainit d82 1 1 c0t1d0s7
4、 创建raid1卷
#metainit d10 -m d11
#metainit d20 -m d21
#metainit d30 -m d31
#metainit d40 -m d41
#metainit d50 -m d51
#metainit d60 -m d61
#metainit d70 -m d71
#metainit d80 -m d81
#metainit d90 -m d91
5、 关于根分区/的处理
根据前面的分区情况,我们知道 / 分区对应的分区是c0t0d0s0和c0t1d0s0,对应的卷名分别为d11和d12,计划作成d10 mirror。
#lockfs -fa
#metaroot d10
6、 关于swap的处理
如下命令查看swap分区情况:
#swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s1 32,17 16 4198368 4127056
#dumpadm -d /dev/md/dsk/d20
7、 修改/etc/vfstab文件
原来的文件内容是:
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no -
/dev/dsk/c0t0d0s2 /dev/rdsk/c0t0d0s2 /usr ufs 1 no -
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /var ufs 1 no -
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /export/home ufs 2 yes -
/dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /opt ufs 2 yes -
/dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /tmp ufs 2 yes -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
修改后的内容是:
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/md/dsk/d20 - - swap - no -
/dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no -
/dev/md/dsk/d30 /dev/md/rdsk/d30 /usr ufs 1 no -
/dev/md/dsk/d60 /dev/md/rdsk/d60 /var ufs 1 no -
/dev/md/dsk/d70 /dev/md/rdsk/d70 /export/home ufs 2 yes -
/dev/md/dsk/d50 /dev/md/rdsk/d50 /opt ufs 2 yes -
/dev/md/dsk/d40 /dev/md/rdsk/d40 /tmp ufs 2 yes -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
8、 添加内核参数
#vi /etc/system
添加如下一行:
set md:mirrored_root_flag=1
9、 重起系统
#sync
#reboot
10、 追加submirror
#metattach d10 d12
#metattach d20 d22
#metattach d30 d32
#metattach d40 d42
#metattach d50 d52
#metattach d60 d62
#metattach d70 d72
增加:
1. echo "set md:mirrored_root_flag=1" >> /etc/system 就不会有50%的限制了。
阅读(1449) | 评论(0) | 转发(0) |