Sun Cluster 3.0 12/01 軟體安裝手冊

範例 - 鏡像 root (/) 檔案系統

以下範例顯示在 phys-schost-1 上建立的鏡像 d0,是由分割區 c0t0d0s0 上的子鏡像 d10c2t2d0s0 上的子鏡像 d20 所組成。磁碟 c2t2d0 是多埠連接的磁碟,所以啟用 localonly 屬性。


(Create the mirror)
# metainit -f d10 1 1 c0t0d0s0
d11: Concat/Stripe is setup
# metainit -f d20 1 1 c2t2d0s0
d12: Concat/Stripe is setup
# metainit d0 -m d10
d10: Mirror is setup
# metaroot d0
# lockfs -fa
 
(將節點重新開機)
# scswitch -S -h phys-schost-1
# shutdown -g0 -y -i6
 
(連接第二個子鏡像)
# metattach d0 d20
d0: Submirror d20 is attached
 
(Display the node list of the mirror disk's raw
disk device group)
# scconf -pvv | grep dsk/d2
Device group name:                                 dsk/d2
...
  (dsk/d2) Device group node list:                 phys-schost-1, phys-schost-3
...
 
(Remove phys-schost-3 from the node list for the
raw disk device group)
# scconf -r -D name=dsk/d2,nodelist=phys-schost-3
 
(Enable the localonly property of the mirrored disk's
raw disk device group)
# scconf -c -D name=dsk/d2,localonly=true
 
(Record the alternate boot path)
# ls -l /dev/rdsk/c2t2d0s0
lrwxrwxrwx  1 root     root          57 Apr 25 20:11 /dev/rdsk/c2t2d0s0 -> 
../../devices/node@1/pci@1f,0/pci@1/scsi@3,1/disk@2,0:a,raw