歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> 關於Unix >> SUN 根盤鏡像

SUN 根盤鏡像

日期:2017/2/28 11:18:01   编辑:關於Unix


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 c0t0d0s7
metainit d32 1 1 c0t1d0s7
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
換上新盤同步分區後後執行
7.維護兩個子鏡像
metarepalce –e d10 c0t0d0s0
metarepalce –e d20 c1t0d0s1
metarepalce –e d30 c0t0d0s7
(可能是OK狀態 就不需要維護)
8.通過metastat|grep %
Copyright © Linux教程網 All Rights Reserved