Sun Cluster 3.1 Software Installation Guide

Example—Mirroring File Systems That Can Be Unmounted

The following example shows creation of mirror d4 to mirror /export, which resides on c0t0d0s4. Mirror d4 consists of submirror d14 on partition c0t0d0s4 and submirror d24 on partition c2t2d0s4. The /etc/vfstab file entry for /export is updated to use the mirror name d4. Disk c2t2d0 is a multiported disk, so the localonly property is enabled.

(Create the mirror)
# 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
(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 /export 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
(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