下面的示例显示如何在 phys-schost-1 节点上创建镜像 d0,该镜像由分区 c0t0d0s0 的子镜像 d10 和分区 c2t2d0s0 的子镜像 d20 构成。磁盘 c2t2d0 是一个多端口的磁盘,因而可启用 localonly 特性。
(创建镜像) # 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 (启用镜像磁盘的原始磁盘设备组的 localonly 特性) # scconf -c -D name=dsk/d2,localonly=true (记录替代引导路径) # 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 |