Sun Cluster 軟體安裝指南 (適用於 Solaris 作業系統)

範例—鏡像無法卸載的檔案系統

下列範例顯示在節點 d1 phys‐schost‐1 建立鏡映,以便鏡映 /usr,這是位於 c0t0d0s1 上。d1 鏡像包含分割區 c0t0d0s1 上的子鏡像 d11 和分割區 c2t2d0s1 上的 d21/usr/etc/vfstab 檔案項目會更新為使用鏡像名稱 d1。裝置 c2t2d0 是多重主機磁碟,因此已啟用 localonly 特性。


(建立鏡像)
# metainit -f d11 1 1 c0t0d0s1
d11: Concat/Stripe is setup
# metainit d21 1 1 c2t2d0s1
d21: Concat/Stripe is setup
# metainit d1 -m d11
d1: Mirror is setup
 
(編輯 /etc/vfstab 檔案)
# vi /etc/vfstab
#device        device        mount    FS     fsck    mount    mount
#to mount      to fsck       point    type   pass    at boot  options
#
/dev/md/dsk/d1 /dev/md/rdsk/d1 /usr ufs  2       no global
 
(移動 phys-schost-1 中的資源群組和裝置群組)
# scswitch -S -h phys-schost-1
 
(重新啟動節點)
# shutdown -g0 -y -i6
 
(附加第二子鏡像)
# metattach d1 d21
d1: Submirror d21 is attached
 
(檢視同步狀態)
# metastat d1
d1: Mirror
      Submirror 0: d11
         State: Okay
      Submirror 1: d21
         State: Resyncing
      Resync in progress: 15 % done
…
 
(識別已鏡像磁碟的原始磁碟裝置群組之裝置 ID 名稱)
# scdidadm -L
…
1         phys-schost-3:/dev/rdsk/c2t2d0     /dev/did/rdsk/d2
 
(顯示裝置群組節點清單)
# scconf -pvv | grep dsk/d2
Device group name:						dsk/d2
…
  (dsk/d2) Device group node list:		phys-schost-1, phys-schost-3
…
 
(從節點清單中移除 phys-schost-3)
# scconf -r -D name=dsk/d2,nodelist=phys-schost-3
 
(啟用 localonly 特性)
# scconf -c -D name=dsk/d2,localonly=true