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.
(Unmount the file system) # umount /export (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 device-ID 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 device-group node list) # 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) # scconf -r -D name=dsk/d2,nodelist=phys-schost-3 (Enable the localonly property) # scconf -c -D name=dsk/d2,localonly=true (Mount the file system) # mount /export |
How to Create a Diskset
Perform this procedure for each diskset you create.
Note - If you used SunPlex Manager to install Solstice DiskSuite, one to three disksets might already exist. See Using SunPlex Manager to Install Sun Cluster Software for information about the metasets that were created by SunPlex Manager.
Do you intend to create more than three disksets in the cluster?
Ensure that the value of the md_nsets variable is set high enough to accommodate the total number of disksets you intend to create in the cluster.
On any node of the cluster, check the value of the md_nsets variable in the /kernel/drv/md.conf file.
If the total number of disksets in the cluster will be greater than the existing value of md_nsets minus one, on each node increase the value of md_nsets to the desired value.
The maximum permissible number of disksets is one less than the configured value of md_nsets. The maximum possible value of md_nsets is 32.
Ensure that the /kernel/drv/md.conf file is identical on each node of the cluster.
Caution - Failure to follow this guideline can result in serious Solstice DiskSuite/Solaris Volume Manager errors and possible loss of data.From one node, shut down the cluster.
# scshutdown -g0 -y
Reboot each node of the cluster.
ok> boot
On each node in the cluster, run the devfsadm(1M) command.
You can run this command on all nodes in the cluster at the same time.
From one node of the cluster, run the scgdevs(1M) command to update the global-devices namespace.
On each node, verify that the scgdevs command has completed processing before you attempt to create any disksets.
The scgdevs command calls itself remotely on all nodes, even when the command is run from just one node. To determine whether the scgdevs command has completed processing, run the following command on each node of the cluster.
% ps -ef | grep scgdevs
Ensure that the diskset you intend to create meets one of the following requirements.
If the diskset is configured with exactly two disk strings, the diskset must connect to exactly two nodes and use exactly two mediator hosts, which must be the same two hosts used for the diskset. See Configuring Mediators for details on how to configure mediators.
If the diskset is configured with more than two disk strings, ensure that for any two disk strings S1 and S2, the sum of the number of disk drives on those strings exceeds the number of disk drives on the third string S3. Stated as a formula, the requirement is that count(S1) + count(S2) > count(S3).
Ensure that the local state database replicas exist.
For instructions, see How to Create State Database Replicas.
Become superuser on the cluster node that will master the diskset.
Create the diskset.
The following command creates the diskset and registers the diskset as a Sun Cluster disk device group.
# metaset -s setname -a -h node1 node2
-s setname Specifies the diskset name
-a Adds (creates) the diskset
-h node1 Specifies the name of the primary node to master the diskset
node2 Specifies the name of the secondary node to master the diskset
Note - When you run the metaset command to configure a Solstice DiskSuite/Solaris Volume Manager device group on a cluster, the command designates one secondary node by default. You can change the desired number of secondary nodes in the device group by using the scsetup(1M) utility after the device group is created. Refer to "Administering Disk Device Groups" in Sun Cluster 3.1 10/03 System Administration Guide for more information about how to change the numsecondaries property.
Verify the status of the new diskset.
# metaset -s setname
Add disk drives to the diskset.



