Use this procedure to mirror the global devices namespace, /global/.devices/node@nodeid/.
Do not use this procedure if the global-devices namespace is on a lofi-based file. Instead, go to How to Mirror the Root (/) File System.
Become superuser.
Place the global devices namespace slice in a single-slice (one-way) concatenation.
Use the physical disk name of the disk slice (cNtXdY sZ).
phys-schost# metainit -f submirror1 1 1 diskslice |
Create a second concatenation.
phys-schost# metainit submirror2 1 1 submirror-diskslice |
Create a one-way mirror with one submirror.
phys-schost# metainit mirror -m submirror1 |
The volume name for a mirror on which a global-devices file system, /global/.devices/node@nodeid, is to be mounted must be unique throughout the cluster.
Attach the second submirror to the mirror.
This attachment starts a synchronization of the submirrors.
phys-schost# metattach mirror submirror2 |
Edit the /etc/vfstab file entry for the /global/.devices/node@nodeid file system.
Replace the names in the device to mount and device to fsck columns with the mirror name.
phys-schost# vi /etc/vfstab #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # /dev/md/dsk/mirror /dev/md/rdsk/mirror /global/.devices/node@nodeid ufs 2 no global |
Repeat Step 1 through Step 6 on each remaining node of the cluster.
Wait for the synchronization of the mirrors, started in Step 5, to be completed.
Use the metastat(1M) command to view mirror status and to verify that mirror synchronization is complete.
phys-schost# metastat mirror |
If the disk that is used to mirror the global devices namespace is physically connected to more than one node (multihosted), disable fencing for that disk.
Disabling fencing for the device prevents unintentional fencing of a node from its boot device if the boot device is connected to multiple nodes.
phys-schost# cldevice set -p default_fencing=nofencing submirror-disk |
Specifies a device property.
Disables fencing for the specified device.
For more information about the default_fencing property, see the cldevice(1CL) man page.
The following example shows creation of mirror d101, which consists of submirror d111 on partition c0t0d0s3 and submirror d121 on partition c2t2d0s3. The /etc/vfstab file entry for /global/.devices/node@1 is updated to use the mirror name d101. Device c2t2d0 is a multihost disk, so fencing is disabled.
phys-schost# metainit -f d111 1 1 c0t0d0s3 d111: Concat/Stripe is setup phys-schost# metainit d121 1 1 c2t2d0s3 d121: Concat/Stripe is setup phys-schost# metainit d101 -m d111 d101: Mirror is setup phys-schost# metattach d101 d121 d101: Submirror d121 is attached phys-schost# vi /etc/vfstab #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # /dev/md/dsk/d101 /dev/md/rdsk/d101 /global/.devices/node@1 ufs 2 no global phys-schost# metastat d101 d101: Mirror Submirror 0: d111 State: Okay Submirror 1: d121 State: Resyncing Resync in progress: 15 % done … phys-schost# cldevice show phys-schost-3:/dev/rdsk/c2t2d0 === DID Device Instances === DID Device Name: /dev/did/rdsk/d2 Full Device Path: phys-schost-1:/dev/rdsk/c2t2d0 Full Device Path: phys-schost-3:/dev/rdsk/c2t2d0 … phys-schost# cldevicegroup show | grep dsk/d2 Device Group Name: dsk/d2 … Node List: phys-schost-1, phys-schost-3 … localonly: false phys-schost# cldevicegroup remove-node -n phys-schost-3 dsk/d2 phys-schost# cldevice set -p default_fencing=nofencing c2t2d0 |
To mirror file systems other than root (/) that cannot be unmounted, go to How to Mirror File Systems Other Than Root (/) That Cannot Be Unmounted.
To mirror user-defined file systems, go to How to Mirror File Systems That Can Be Unmounted
Otherwise, go to Creating Disk Sets in a Cluster to create a disk set.
Some of the steps in this mirroring procedure might cause an error message similar to metainit: dg-schost-1: d1s0: not a metadevice. Such an error message is harmless and can be ignored.