好吃懒做
分类:
2008-08-14 16:35:43
1、划分磁盘分区:
c0t0d0s0 c0t1d0s0 58.42G
c0t0d0s1 c0t1d0s1 4G
c0t0d0s7 c0t1d0s7 5.86G
c0t0d0s3 c0t1d0s3 100M
prtvtoc /dev/rdsk/c0t0d0s2 |fmthard -s - /dev/rdsk/c0t1d0s2
2、根分区镜像:
metadb -f -a -c 3 c0t0d0s3 c0t1d0s3
metainit -f d11 1 1 c0t0d0s0
metainit d12 1 1 c0t1d0s0
metainit d10 -m d11
更新/etc/fstab文件:
cp /etc/vfstab /etc/vfstab.bak
#cp /etc/system /etc/system.bak
#metaroot d10
3、
metainit -f d21 1 1 c0t0d0s1
metainit d22 1 1 c0t1d0s1
metainit d20 -m d21
metainit -f d31 1 1 c0t0d0s1
metainit d32 1 1 c0t1d0s1
metainit d30 -m d31
编辑/etc/vfstab
metainit hsp001
lockfs -fa
init 6
3、挂载第2个sub-mirror
metattach d10 d12
metattach d20 d22
netattach d30 d32
4、生成启动块
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0
换盘步骤:
1.清除metadb
metadb -d c1t0d0s3 删除坏盘的metadb
luxadm remove_device /dev/rdsk/c1t0d0s2(可跳过,直接拔)
2.换下坏的硬盘
3.luxadm insert_device
4.devfsadm -v后查看一下盘的状况
5.prtvtoc /dev/dsk/c0t1d0s2 | fmthard -s - /dev/rdsk/c0t0d0s2
换上新盘同步分区后后执行
6.metadb -afc3 c0t0d0s3建立新的metadb
7.维护两个子镜像
metarepalce –e d10 c0t0d0s0
metarepalce –e d20 c1t0d0s1
metarepalce –e d30 c0t0d0s7
(可能是OK状态 就不需要维护)
8.通过metastat|grep %