下列範例顯示在 c0t0d0s4 建立鏡映 d4 以鏡映 /home。鏡映d4 包含分割區 c0t0d0s4 上的 子鏡映 d14 和分割區 c2t2d0s4 上的子鏡映 d24。/home 的 /etc/vfstab 檔案登錄會更新為 使用鏡映名稱 d4。磁碟 c2t2d0 是多埠連接的磁碟,所以啟用 localonly 屬性。
(Create the mirror:) # metainit -f d14 1 1 c0t0d0s4 d14: Concat/Stripe is setup # metainit -f d24 1 1 c2t2d0s4 d24: Concat/Stripe is setup # metainit d4 -m d14 d4: Mirror is setup (Edit the /etc/vfstab file:) # 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 /home ufs 2 no global (Attach the second submirror:) # metattach d4 d24 d4: Submirror d24 is attached (View the sync status:) # metastat d4 d4: Mirror Submirror 0: d14 State: Okay Submirror 1: d24 State: Resyncing Resync in progress: 15 % done ... (Identify the DID name of the mirrored disk's raw disk device group:) # scdidadm -L ... 1 phys-schost-3:/dev/rdsk/c2t2d0 /dev/did/rdsk/d2 (啟用鏡映磁碟的原始磁碟裝置群組的 localonly 屬性:) # scconf -c -D name=dsk/d2,localonly=true |