下列範例顯示 d4 的建立,以鏡像 /export,這是位於 c0t0d0s4。d4 鏡像是由分割區 c0t0d0s4 上的子鏡像 d14 和分割區 c2t2d0s4 上的子鏡像 d24 所組成。/export 的 /etc/vfstab 檔案項目會更新為使用鏡像名稱 d4。裝置 c2t2d0 是多重主機磁碟,因此已啟用 localonly 特性。
(卸載檔案系統) # umount /export (建立鏡像) # metainit -f d14 1 1 c0t0d0s4 d14: Concat/Stripe is setup # metainit d24 1 1 c2t2d0s4 d24: Concat/Stripe is setup # metainit d4 -m d14 d4: 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/d4 /dev/md/rdsk/d4 /export ufs 2 no global (附加第二子鏡像) # metattach d4 d24 d4: Submirror d24 is attached (檢視同步狀態) # metastat d4 d4: Mirror Submirror 0: d14 State: Okay Submirror 1: d24 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 (掛載檔案系統) # mount /export |