After a device group has been registered with the cluster, never import or export a VxVM disk group by using VxVM commands. If you make a change to the VxVM disk group or volume, follow the procedure How to Register Disk Group Configuration Changes (Veritas Volume Manager) to register the device group configuration changes. This procedure ensures that the global namespace is in the correct state.
The phys-schost# prompt reflects a global-cluster prompt. Perform this procedure on a global cluster.
This procedure provides the long forms of the Sun Cluster commands. Most commands also have short forms. Except for the long and short forms of the command names, the commands are identical. For a list of the commands and their short forms, see Appendix B, Sun Cluster Object-Oriented Commands.
Ensure that the following prerequisites have been completed prior to registering a VxVM device group:
Superuser privilege on a node in the cluster.
The name of the VxVM disk group to be registered as a device group.
A preferred order of nodes to master the device group.
A desired number of secondary nodes for the device group.
When you define the preference order, you also specify whether the device group should be switched back to the most preferred node if that node fails and later returns to the cluster.
See cldevicegroup(1CL) for more information about node preference and failback options.
Nonprimary cluster nodes (spares) transition to secondary according to the node preference order. The default number of secondaries for a device group is normally set to one. This default setting minimizes performance degradation that is caused by primary checkpointing of multiple secondary nodes during normal operation. For example, in a four-node cluster, the default behavior configures one primary, one secondary, and two spare nodes. See also How to Set the Desired Number of Secondaries for a Device Group.
Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node of the cluster.
Start the clsetup utility.
The Main Menu is displayed.
To work with VxVM device groups, type the number that corresponds to the option for device groups and volumes.
The Device Groups Menu is displayed.
To register a VxVM device group, type the number that corresponds to the option for registering a VxVM disk group as a device group.
Follow the instructions and type the name of the VxVM disk group to be registered as a Sun Cluster device group.
If this device group is replicated by using storage-based replication, this name must match the replication group name.
If you use VxVM to set up shared disk groups for Oracle Parallel Server/Oracle RAC, you do not register the shared disk groups with the cluster framework. Use the cluster functionality of VxVM as described in the Veritas Volume Manager Administrator's Reference Guide.
If you encounter the following error while attempting to register the device group, reminor the device group.
scconf: Failed to add device group - in use
To reminor the device group, use the procedure How to Assign a New Minor Number to a Device Group (Veritas Volume Manager). This procedure enables you to assign a new minor number that does not conflict with a minor number that an existing device group uses.
If you are configuring a replicated device group, set the replication property for the device group.
# cldevicegroup sync devicegroup
Verify that the device group is registered and online.
If the device group is properly registered, information for the new device group is displayed when you use the following command.
# cldevicegroup status devicegroup
If you change any configuration information for a VxVM disk group or volume that is registered with the cluster, you must synchronize the device group by using clsetup. Such configuration changes include adding or removing volumes, as well as changing the group, owner, or permissions of existing volumes. Reregistration after configuration changes ensures that the global namespace is in the correct state. See How to Update the Global-Devices Namespace.
The following example shows the cldevicegroup command generated by clsetup when it registers a VxVM device group (dg1), and the verification step. This example assumes that the VxVM disk group and volume were created previously.
# clsetup # cldevicegroup create -t vxvm -n phys-schost-1,phys-schost-2 -p failback=true dg1 # cldevicegroup status dg1 === Cluster Device Groups === --- Device Group Status --- Device Group Name Primary Secondary Status ----------------- ------- --------- ------ dg1 phys-schost-1 phys-schost-2 Online
To create a cluster file system on the VxVM device group, see How to Add a Cluster File System.
If problems occur with the minor number, see How to Assign a New Minor Number to a Device Group (Veritas Volume Manager).