Sun Cluster System Administration Guide for Solaris OS

Administering Device Groups

As your cluster requirements change, you might need to add, remove, or modify the device groups on your cluster. Sun Cluster provides an interactive interface called clsetup that you can use to make these changes. clsetup generates cluster commands. Generated commands are shown in the examples at the end of some procedures. The following table lists tasks for administering device groups and provides links to the appropriate procedures in this section.


Caution – Caution –

Do not run metaset —s setname —f -t on a cluster node that is booted outside the cluster if other nodes are active cluster members and at least one of them owns the disk set.



Note –

Sun Cluster software automatically creates a raw-disk device group for each disk and tape device in the cluster. However, cluster device groups remain in an offline state until you access the groups as global devices.


Table 5–4 Task Map: Administering Device Groups

Task 

Instructions 

Update the global device namespace without a reconfiguration reboot by using the cldevice populate command

How to Update the Global Device Namespace

Add Solaris Volume Manager disk sets and register them as device groups by using the metaset command

How to Add and Register a Device Group (Solaris Volume Manager)

Remove Solaris Volume Manager device groups from the configuration by using the metaset and metaclear commands

How to Remove and Unregister a Device Group (Solaris Volume Manager)

Remove a node from all device groups by using the cldevicegroup, metaset, and clsetup commands

How to Remove a Node From All Device Groups

Remove a node from a Solaris Volume Manager device group by using the metaset command

How to Remove a Node From a Device Group (Solaris Volume Manager)

SPARC: Add Veritas Volume Manager disk groups as device groups by using VxVM commands and clsetup

SPARC: How to Create a New Disk Group When Initializing Disks (Veritas Volume Manager)

SPARC: How to Create a New Disk Group When Encapsulating Disks (Veritas Volume Manager)

SPARC: How to Add a New Volume to an Existing Device Group (Veritas Volume Manager)

SPARC: How to Convert an Existing Disk Group to a Device Group (Veritas Volume Manager)

SPARC: How to Assign a New Minor Number to a Device Group (Veritas Volume Manager)

SPARC: How to Register a Disk Group as a Device Group (Veritas Volume Manager)

How to Convert a Local Disk Group to a Device Group (VxVM)

How to Convert a Device Group to a Local Disk Group (VxVM)

SPARC: How to Register Disk Group Configuration Changes (Veritas Volume Manager)

SPARC: Remove Veritas Volume Manager device groups from the configuration by using the clsetup (to generate cldevicegroup) commands

SPARC: How to Remove a Volume From a Device Group (Veritas Volume Manager)

SPARC: How to Remove and Unregister a Device Group (Veritas Volume Manager)

SPARC: Add a node to a Veritas Volume Manager device group by using clsetup to generate cldevicegroup

SPARC: How to Add a Node to a Device Group (Veritas Volume Manager)

SPARC: Remove a node from a Veritas Volume Manager device group by using clsetup to generate cldevicegroup

SPARC: How to Remove a Node From a Device Group (Veritas Volume Manager)

Remove a node from a raw-disk device group by using the cldevicegroup command

How to Remove a Node From a Raw-Disk Device Group

Change device group properties by using clsetup to generate cldevicegroup

How to Change Device Group Properties

Display device groups and properties by using the cldevicegroup show command

How to List a Device Group Configuration

Change the desired number of secondaries for a device group by using clsetup to generate cldevicegroup

How to Set the Desired Number of Secondaries for a Device Group

Switch the primary for a device group by using the cldevicegroup switch command

How to Switch the Primary for a Device Group

Put a device group in maintenance state by using the metaset or vxdg command

How to Put a Device Group in Maintenance State

ProcedureHow to Update the Global Device Namespace

When adding a new global device, manually update the global device namespace by running the cldevice populate command.


Note –

The cldevice populate command does not have any effect if the node that is running the command is not currently a cluster member. The command also has no effect if the /global/.devices/node@ nodeID file system is not mounted.


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.

  1. Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node of the cluster.

  2. 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.

  3. Reconfigure the namespace.


    # cldevice populate
    
  4. On each node, verify that the cldevice populate command has been completed before you attempt to create any disk sets.

    The cldevice command calls itself remotely on all nodes, even when the command is run from just one node. To determine whether the cldevice populate command has completed processing, run the following command on each node of the cluster.


    # ps -ef | grep scgdevs
    

Example 5–20 Updating the Global Device Namespace

The following example shows the output generated by successfully running the cldevice populate command.


# devfsadm
cldevice populate 
Configuring the /dev/global directory (global devices)...
obtaining access to all attached disks
reservation program successfully exiting
# ps -ef | grep scgdevs

ProcedureHow to Add and Register a Device Group (Solaris Volume Manager)

Use the metaset command to create a Solaris Volume Manager disk set and register the disk set as a Sun Cluster device group. When you register the disk set, the name that you assigned to the disk set is automatically assigned to the device group.

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.


Caution – Caution –

The name of the Sun Cluster device group that you create (Solaris Volume Manager, Veritas Volume Manager, or raw-disk) must be the same as the name of the replicated device group.


  1. Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on one of the nodes connected to the disks where you are creating the disk set.

  2. SPARC: Solaris 9 only: Calculate the number of names for Solstice DiskSuite metadevices or Solaris Volume Manager volumes that you need for your configuration, and modify the /kernel/drv/md.conf file on each node. This step is not required if you are running on Solaris 10.

    See “How to Set the Number of Metadevice or Volume Names and Disk Sets ” in Sun Cluster Software Installation Guide for Solaris OS.

  3. Add the Solaris Volume Manager disk set and register it as a device group with Sun Cluster. To create a multi-owner disk group, use the –M option.


    # metaset -s diskset -a -M -h nodelist
    
    -s diskset

    Specifies the disk set to be created.

    -a -h nodelist

    Adds the list of nodes that can master the disk set.

    -M

    Designates the disk group as multi-owner.


    Note –

    Running the metaset command to set up a Solstice DiskSuite/Solaris Volume Manager device group on a cluster results in one secondary by default, regardless of the number of nodes that are included in that device group. You can change the desired number of secondary nodes by using the clsetup utility after the device group has been created. Refer to How to Set the Desired Number of Secondaries for a Device Group for more information about disk failover.


  4. If you are configuring a replicated device group, set the replication property for the device group.


    # cldevicegroup sync devicegroup
    
  5. Verify that the device group has been added.

    The device group name matches the disk set name that is specified with metaset.


    # cldevicegroup list
    
  6. List the DID mappings.


    # cldevice show | grep Device
    
    • Choose drives that are shared by the cluster nodes that will master or potentially master the disk set.

    • Use the full DID device name, which has the form /dev/did/rdsk/dN, when you add a drive to a disk set.

    In the following example, the entries for DID device /dev/did/rdsk/d3 indicate that the drive is shared by phys-schost-1 and phys-schost-2.


    === DID Device Instances ===                   
    DID Device Name:                                /dev/did/rdsk/d1
      Full Device Path:                               phys-schost-1:/dev/rdsk/c0t0d0
    DID Device Name:                                /dev/did/rdsk/d2
      Full Device Path:                               phys-schost-1:/dev/rdsk/c0t6d0
    DID Device Name:                                /dev/did/rdsk/d3
      Full Device Path:                               phys-schost-1:/dev/rdsk/c1t1d0
      Full Device Path:                               phys-schost-2:/dev/rdsk/c1t1d0
    …
  7. Add the drives to the disk set.

    Use the full DID path name.


    # metaset -s setname -a /dev/did/rdsk/dN
    
    -s setname

    Specifies the disk set name, which is the same as the device group name.

    -a

    Adds the drive to the disk set.


    Note –

    Do not use the lower-level device name (cNtXdY) when you add a drive to a disk set. Because the lower-level device name is a local name and not unique throughout the cluster, using this name might prevent the metaset from being able to switch over.


  8. Verify the status of the disk set and drives.


    # metaset -s setname
    

Example 5–21 Adding a Solaris Volume Manager Device Group

The following example shows the creation of the disk set and device group with the disk drives /dev/did/rdsk/d1 and /dev/did/rdsk/d2 and verifies that the device group has been created.


# metaset -s dg-schost-1 -a -h phys-schost-1

# cldevicegroup list
dg-schost-1 
metaset -s dg-schost-1 -a /dev/did/rdsk/d1 /dev/did/rdsk/d2

How to Remove and Unregister a Device Group (Solaris Volume Manager)

Device groups are Solaris Volume Manager disk sets that have been registered with Sun Cluster. To remove a Solaris Volume Manager device group, use the metaclear and metaset commands. These commands remove the device group with the same name and unregister the disk group as a Sun Cluster device group.

Refer to the Solaris Volume Manager documentation for the steps to remove a disk set.

ProcedureHow to Remove a Node From All Device Groups

Use this procedure to remove a cluster node from all device groups that list the node in their lists of potential primaries.

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.

  1. Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on the node that you are removing as a potential primary of all device groups.

  2. Determine the device group or groups of which the node to be removed is a member.

    Look for the node name in the Device group node list for each device group.


    # cldevicegroup list -v
    
  3. If any of the device groups identified in Step 2 are of the device group type SVM, perform the steps in How to Remove a Node From a Device Group (Solaris Volume Manager) for each device group of that type.

  4. If any of the device groups identified in Step 2 are of the device group type VxVM, perform the steps in SPARC: How to Remove a Node From a Device Group (Veritas Volume Manager) for each device group of that type.

  5. Determine the raw-device disk groups of which the node to be removed is a member.


    # cldevicegroup list -v
    
  6. If any of the device groups listed in Step 5 are of the device group types Disk or Local_Disk, perform the steps in How to Remove a Node From a Raw-Disk Device Group for each of these device groups.

  7. Verify that the node has been removed from the potential primaries list of all device groups.

    The command returns nothing if the node is no longer listed as a potential primary of any device group.


    # cldevicegroup list -v nodename
    

ProcedureHow to Remove a Node From a Device Group (Solaris Volume Manager)

Use this procedure to remove a cluster node from the list of potential primaries of a Solaris Volume Manager device group. Repeat the metaset command for each device group from which you want to remove the node.


Caution – Caution –

Do not run metaset —s setname —f -t on a cluster node that is booted outside the cluster if other nodes are active cluster members and at least one of them owns the disk set.


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.

  1. Verify that the node is still a member of the device group and that the device group is a Solaris Volume Manager device group.

    Device group type SDS/SVM indicates a Solaris Volume Manager device group.


    phys-schost-1% cldevicegroup show devicegroup
    
  2. Determine which node is the current primary for the device group.


    # cluster status -t devicegroup
    
  3. Become superuser on the node that currently owns the device group that you want to modify.

  4. Delete the node's hostname from the device group.


    # metaset -s setname -d -h nodelist
    
    -s setname

    Specifies the device group name.

    -d

    Deletes from the device group the nodes identified with -h.

    -h nodelist

    Specifies the node name of the node or nodes that will be removed.


    Note –

    The update can take several minutes to complete.


    If the command fails, add the -f (force) option to the command.


    # metaset -s setname -d -f -h nodelist
    
  5. Repeat Step 4 for each device group from which the node is being removed as a potential primary.

  6. Verify that the node has been removed from the device group.

    The device group name matches the disk set name that is specified with metaset.


    phys-schost-1% cldevicegroup list -v devicegroup
    

Example 5–22 Removing a Node From a Device Group (Solaris Volume Manager)

The following example shows the removal of the hostname phys-schost-2 from a device group configuration. This example eliminates phys-schost-2 as a potential primary for the designated device group. Verify removal of the node by running the cldevicegroup show command. Check that the removed node is no longer displayed in the screen text.


[Determine the Solaris Volume Manager
 device group for the node:]
# cldevicegroup show dg-schost-1
=== Device Groups ===                          

Device Group Name:                    dg-schost-1
  Type:                                 SVM
  failback:                             no
  Node List:                            phys-schost-1, phys-schost-2
  preferenced:                          yes
  numsecondaries:                       1
  diskset name:                         dg-schost-1
[Determine which node is the current primary for the device group:]
# cldevicegroup status dg-schost-1
=== Cluster Device Groups ===

--- Device Group Status ---

Device Group Name    Primary         Secondary      Status
-----------------    -------         ---------      ------
dg-schost-1          phys-schost-1   phys-schost-2  Online
[Become superuser on the node that currently owns the device group.]
[Remove the host name from the device group:]
# metaset -s dg-schost-1 -d -h phys-schost-2
[Verify removal of the node:]]
phys-schost-1% cldevicegroup list -v dg-schost-1
=== Cluster Device Groups ===

--- Device Group Status ---

Device Group Name    Primary         Secondary      Status
-----------------    -------         ---------      ------
dg-schost-1          phys-schost-1   -              Online

ProcedureHow to Create More Than Three Disk Sets in a Cluster

If you are running Solaris 9 and intend to create more than three disk sets in the cluster, perform the following steps before you create the disk sets. You do not need to perform this procedure if you are running Solaris 10. Follow these steps if you are installing disk sets for the first time or if you are adding more disk sets to a fully configured cluster.

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.

  1. Ensure that the value of the md_nsets variable is high enough. The value should accommodate the total number of disk sets you intend to create in the cluster.

    1. On any node of the cluster, check the value of the md_nsets variable in the /kernel/drv/md.conf file.

    2. If the number of disk sets in the cluster will be greater than the existing value of md_nsets minus one, increase the value of md_nsets on each node.

      The maximum permissible number of disk sets is the value of md_nsets minus one. The maximum possible value of md_nsets is 32.

    3. Ensure that the /kernel/drv/md.conf file is identical on each node of the cluster.


      Caution – Caution –

      Failure to follow this guideline can result in serious Solaris Volume Manager errors and possible loss of data.


    4. From one node, shut down the cluster.


      # cluster shutdown -g0 -y
      
    5. Reboot each node in the cluster.

      • On SPARC based systems, run the following command.


        ok boot
        
      • On x86 based systems, run the following commands.

        When the GRUB menu is displayed, select the appropriate Solaris entry and press Enter. The GRUB menu appears similar to the following:


        GNU GRUB version 0.95 (631K lower / 2095488K upper memory)
        +-------------------------------------------------------------------------+
        | Solaris 10 /sol_10_x86                                                  |
        | Solaris failsafe                                                        |
        |                                                                         |
        +-------------------------------------------------------------------------+
        Use the ^ and v keys to select which entry is highlighted.
        Press enter to boot the selected OS, 'e' to edit the
        commands before booting, or 'c' for a command-line.
  2. 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.

  3. From one node of the cluster, run the cldevice populate command.

  4. On each node, verify that the cldevice populate command has been completed before you attempt to create any disk sets.

    The cldevice command calls itself remotely on all nodes, even when the command is run from just one node. To determine whether the cldevice populate command has completed processing, run the following command on each node of the cluster.


    # ps -ef | grep scgdevs
    

ProcedureSPARC: How to Create a New Disk Group When Initializing Disks (Veritas Volume Manager)


Note –

This procedure is only for initializing disks. If you are encapsulating disks, use the procedure SPARC: How to Create a New Disk Group When Encapsulating Disks (Veritas Volume Manager).


After adding the VxVM disk group, you need to register the device group.

If you use VxVM to set up shared disk groups for Oracle RAC, use the cluster functionality of VxVM as described in the Veritas Volume Manager Administrator's Reference Guide.

  1. Become superuser on any cluster node that is physically connected to disks that make up the disk group being added.

  2. Create the VxVM disk group and volume.

    Use your preferred method to create the disk group and volume.


    Note –

    If you are setting up a mirrored volume, use Dirty Region Logging (DRL) to decrease volume recovery time after a node failure. However, DRL might decrease I/O throughput.


    See the Veritas Volume Manager documentation for the procedures to complete this step.

  3. Register the VxVM disk group as a Sun Cluster device group.

    See SPARC: How to Register a Disk Group as a Device Group (Veritas Volume Manager).

    Do not register the Oracle RAC shared disk groups with the cluster framework.

ProcedureSPARC: How to Create a New Disk Group When Encapsulating Disks (Veritas Volume Manager)


Note –

This procedure is only for encapsulating disks. If you are initializing disks, use the procedure SPARC: How to Create a New Disk Group When Initializing Disks (Veritas Volume Manager).


You can convert nonroot disks to Sun Cluster device groups by encapsulating the disks as VxVM disk groups, then registering the disk groups as Sun Cluster device groups.

Disk encapsulation is only supported during initial creation of a VxVM disk group. After a VxVM disk group is created and registered as a Sun Cluster device group, only disks which can be initialized should be added to the disk group.

If you use VxVM to set up shared disk groups for Oracle RAC, use the cluster functionality of VxVM as described in the Veritas Volume Manager Administrator's Reference Guide.

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.

  1. Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node of the cluster.

  2. If the disk being encapsulated has file system entries in the /etc/vfstab file, make sure that the mount at boot option is set to no.

    Set back to yes after the disk is encapsulated and registered as a Sun Cluster device group.

  3. Encapsulate the disks.

    Use vxdiskadm menus or the graphical user interface to encapsulate the disks. VxVM requires two free partitions as well as unassigned cylinders at the beginning or the end of the disk. Slice two must also be set to the entire disk. See the vxdiskadm man page for more information.

  4. Shut down and restart the node.

    The clnode evacuate command switches over all resource groups and device groups including all non-voting nodes in a global cluster from the specified node to a next-preferred node. Use the shutdown command to shut down and restart the node.


    # clnode evacuate  node[,...]
    # shutdown -g0 -y -i6
    
  5. If necessary, switch all resource groups and device groups back to the original node.

    If the resource groups and device groups were initially configured to fail back to the primary node, this step is not necessary.


    # cldevicegroup switch -n node devicegroup 
    # clresourcegroup switch -z zone -n node resourcegroup 
    
    node

    The name of the node.

    zone

    The name of the non-voting node, node, that can master the resource group. Specify zone only if you specified a non-voting node when you created the resource group.

  6. Register the VxVM disk group as a Sun Cluster device group.

    See SPARC: How to Register a Disk Group as a Device Group (Veritas Volume Manager).

    Do not register the Oracle RAC shared disk groups with the cluster framework.

  7. If you set the mount at boot option to no in Step 2, set it back to yes.

ProcedureSPARC: How to Add a New Volume to an Existing Device Group (Veritas Volume Manager)

When you add a new volume to an existing VxVM device group, perform the procedure from the primary node of the online device group.


Note –

After adding the volume, you need to register the configuration change by using the procedure SPARC: How to Register Disk Group Configuration Changes (Veritas Volume Manager).


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.

  1. Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.administer RBAC authorization on any node of the cluster.

  2. Determine the primary node for the device group to which you are adding the new volume.


    # cldevicegroup status
    
  3. If the device group is offline, bring the device group online.


    # cldevicegroup switch -n nodename devicegroup
    
    nodename

    Specifies the name of the node to which to switch the device group. This node becomes the new primary.

    devicegroup

    Specifies the device group to switch.

  4. From the primary node (the node currently mastering the device group), create the VxVM volume in the disk group.

    Refer to your Veritas Volume Manager documentation for the procedure used to create the VxVM volume.

  5. Synchronize the VxVM disk group changes to update the global namespace.

    # cldevicegroup sync

    SPARC: How to Register Disk Group Configuration Changes (Veritas Volume Manager).

ProcedureSPARC: How to Convert an Existing Disk Group to a Device Group (Veritas Volume Manager)

You can convert an existing VxVM disk group to a Sun Cluster device group by importing the disk group onto the current node, then registering the disk group as a Sun Cluster device group.

  1. Become superuser on any node of the cluster.

  2. Import the VxVM disk group to the current node.


    # vxdg import diskgroup
    
  3. Register the VxVM disk group as a Sun Cluster device group.

    See SPARC: How to Register a Disk Group as a Device Group (Veritas Volume Manager).

ProcedureSPARC: How to Assign a New Minor Number to a Device Group (Veritas Volume Manager)

If device group registration fails because of a minor number conflict with another disk group, you must assign the new disk group a new, unused minor number. After assigning the new minor number, rerun the procedure to register the disk group as a Sun Cluster device group.

  1. Become superuser on any node of the cluster.

  2. Determine the minor numbers in use.


    # ls -l /global/.devices/node@nodeid/dev/vx/dsk/*
    
  3. Choose another multiple of 1000 not in use as the base minor number for the new disk group.

  4. Assign the new minor number to the disk group.


    # vxdg reminor diskgroup base-minor-number
    
  5. Register the VxVM disk group as a Sun Cluster device group.

    See SPARC: How to Register a Disk Group as a Device Group (Veritas Volume Manager).


Example 5–23 SPARC: How to Assign a New Minor Number to a Device Group

This example uses the minor numbers 16000-16002 and 4000-4001. The vxdg reminor command is used to assign the base minor number 5000 to the new device group.


# ls -l /global/.devices/node@nodeid/dev/vx/dsk/*

/global/.devices/node@nodeid/dev/vx/dsk/dg1
brw-------   1 root     root      56,16000 Oct  7 11:32 dg1v1
brw-------   1 root     root      56,16001 Oct  7 11:32 dg1v2
brw-------   1 root     root      56,16002 Oct  7 11:32 dg1v3
 
/global/.devices/node@nodeid/dev/vx/dsk/dg2
brw-------   1 root     root      56,4000 Oct  7 11:32 dg2v1
brw-------   1 root     root      56,4001 Oct  7 11:32 dg2v2
# vxdg reminor dg3 5000

ProcedureSPARC: How to Register a Disk Group as a Device Group (Veritas Volume Manager)

This procedure uses the clsetup utility to register the associated VxVM disk group as a Sun Cluster device group.


Note –

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 SPARC: 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.

Before You Begin

Ensure that the following prerequisites have been completed prior to registering a VxVM 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.

  1. Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node of the cluster.

  2. Start the clsetup utility.


    # clsetup
    

    The Main Menu is displayed.

  3. 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.

  4. 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.

  5. 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 SPARC: 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.

  6. If you are configuring a replicated device group, set the replication property for the device group.


    # cldevicegroup sync devicegroup
    
  7. 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
    

    Note –

    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 Device Namespace.



Example 5–24 SPARC: Registering a Veritas Volume Manager Device Group

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

See Also

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 SPARC: How to Assign a New Minor Number to a Device Group (Veritas Volume Manager).

ProcedureSPARC: How to Register Disk Group Configuration Changes (Veritas Volume Manager)

When you change any configuration information for a VxVM disk group or volume, you need to register the configuration changes for the Sun Cluster device group. Registration 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.

  1. Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node in the cluster.

  2. Start the clsetup utility.


    # clsetup
    

    The Main Menu is displayed.

  3. 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.

  4. To register configuration changes, type the number that corresponds to the option for synchronizing volume information for a VxVM device group.

    Follow the instructions and type the name of the VxVM disk group that has changed configuration.


Example 5–25 SPARC: Registering Veritas Volume Manager Disk Group Configuration Changes

The following example shows the cldevicegroup command generated by clsetup a changed VxVM device group (dg1) is registered. This example assumes that the VxVM disk group and volume were created previously.


# clsetup
 
cldevicegroup sync dg1

ProcedureHow to Convert a Local Disk Group to a Device Group (VxVM)

Perform this procedure to change a local VxVM disk group to a globally accessible VxVM device group.

  1. Become superuser on a node of the cluster.

  2. Start the clsetup utility


    # clsetup
    
  3. Unset the localonly property.

    1. Choose the menu item, Device groups and volumes.

    2. Choose the menu item, Reset a local VxVM disk group to a VxVM device group.

    3. Follow the instructions to unset the localonly property.

  4. Specify the nodes that can master the disk group.

    1. Return to the main menu in the clsetup utility.

    2. Choose the menu item, Device groups and volumes.

    3. Choose the menu item, Register a diskgroup.

    4. Follow the instructions to specify the nodes that can master the disk group.

    5. When finished, quit the clsetup utility.

  5. Verify that the device group is configured.


    phys-schost# cldevicegroup show
    

ProcedureHow to Convert a Device Group to a Local Disk Group (VxVM)

Perform this procedure to change a VxVM device group to a local VxVM disk group that is not managed by Sun Cluster software. The local disk group can have more than one node in its node list, but it can be mastered by only one node at a time.

  1. Become superuser on a node of the cluster.

  2. Take the device group offline.


    phys-schost# cldevicegroup offline devicegroup
    
  3. Unregister the device group.

    1. Start the clsetup utility.


      phys-schost# clsetup
      
    2. Choose the menu item, Device groups and volumes.

    3. Choose the menu item, Unregister a VxVM disk group.

    4. Follow the instructions to specify the VxVM disk group that you are unregistering from Sun Cluster software.

    5. Quit the clsetup utility.

  4. Verify that the disk group is no longer registered with Sun Cluster software.


    phys-schost# cldevicegroup status
    

    Command output should no longer show the device group that you unregistered.

  5. Import the disk group.


    phys-schost# vxdg import diskgroup
    
  6. Set the localonly property of the disk group.

    1. Start the clsetup utility.


      phys-schost# clsetup
      
    2. Choose the menu item, Device groups and volumes.

    3. Choose the menu item, Set a VxVM disk group as a local disk group.

    4. Follow the instructions to set the localonly property and to specify the single node that is to exclusively master the disk group.

    5. When finished, quit the clsetup utility.

  7. Verify that the disk group is successfully configured as a local disk group.


    phys-schost# vxdg list diskgroup
    

ProcedureSPARC: How to Remove a Volume From a Device Group (Veritas Volume Manager)


Note –

After removing the volume from the device group, you must register the configuration changes to the device group by using the procedure SPARC: How to Register Disk Group Configuration Changes (Veritas Volume Manager).


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.

  1. Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on any node of the cluster.

  2. Determine the primary node and status for the device group.


    # cldevicegroup status devicegroup
    
  3. If the device group is offline, bring it online.


    # cldevicegroup online devicegroup
    
  4. From the primary node (the node currently mastering the device group), remove the VxVM volume in the disk group.


    # vxedit -g diskgroup -rf rm volume
    
    -g diskgroup

    Specifies the VxVM disk group that contains the volume.

    -rf rm volume

    Removes the specified volume. The -r option makes the operation recursive. The -f option is required to remove an enabled volume.

  5. Using the clsetup utility, register the device group configuration changes to update the global namespace.

    See SPARC: How to Register Disk Group Configuration Changes (Veritas Volume Manager).

ProcedureSPARC: How to Remove and Unregister a Device Group (Veritas Volume Manager)

Removing a Sun Cluster device group causes the corresponding VxVM disk group to be exported, not destroyed. However, even though the VxVM disk group still exists, it cannot be used in the cluster unless reregistered.

This procedure uses the clsetup utility to remove a VxVM disk group and unregister it as a Sun Cluster device group.

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.

  1. Become superuser or assume a role that provides solaris.cluster.modify RBAC authorization on any node of the cluster.

  2. Take the device group offline.


    # cldevicegroup offline devicegroup
    
  3. Start the clsetup utility.


    # clsetup
    

    The Main Menu is displayed.

  4. 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.

  5. To unregister a VxVM disk group, type the number that corresponds to the option for unregistering a VxVM device group.

    Follow the instructions and type the name of the VxVM disk group to be unregistered.


Example 5–26 SPARC: Removing and Unregistering a Veritas Volume Manager Device Group

The following example shows the VxVM device group dg1 taken offline, and the cldevicegroup command generated by clsetup when it removes and unregisters the device group.


# cldevicegroup offline dg1
# clsetup

   cldevicegroup delete dg1

ProcedureSPARC: How to Add a Node to a Device Group (Veritas Volume Manager)

This procedure adds a node to a device group using the clsetup utility.

The prerequisites to add a node to a VxVM device group are:

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.

  1. Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on any node of the cluster.

  2. Start the clsetup utility.


    # clsetup
    

    The Main Menu is displayed.

  3. 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.

  4. To add a node to a VxVM device group, type the number that corresponds to the option for adding a node to a VxVM device group.

    Follow the instructions and type the device group and node names.

  5. Verify that the node has been added.

    Look for the device group information for the new disk displayed by the following command.


    # cldevicegroup show devicegroup 
    

Example 5–27 SPARC: Adding a Node to a Veritas Volume Manager Device Group

The following example shows the scconf command generated by clsetup when it adds a node (phys-schost-3 ) to a VxVM device group (dg1 ), and the verification step.


# clsetup
 
cldevicegroup add-node -n phys-schost-3 dg1
  
# cldevicegroup show dg1

=== Device Groups === 

Device Group Name:                        dg1
  Type:                                     VxVM
  failback:                                 yes
  Node List:                                phys-schost-1, phys-schost-3
  preferenced:                              no
  numsecondaries:                           1
  diskgroup names:                             dg1

ProcedureSPARC: How to Remove a Node From a Device Group (Veritas Volume Manager)

Use this procedure to remove a cluster node from the list of potential primaries of a Veritas Volume Manager (VxVM) device group (disk group).

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.

  1. Verify that the node is still a member of the group and that the group is an VxVM device group.

    Device group type VxVM indicates a VxVM device group.


    phys-schost-1% cldevicegroup show devicegroup
    
  2. Become superuser or assume a role that provides solaris.cluster.readand solaris.cluster.modify RBAC authorization on a current cluster member node.

  3. Start the clsetup utility.


    # clsetup
    

    The Main Menu is displayed.

  4. To reconfigure a device group, type the number that corresponds to the option for device groups and volumes.

  5. To remove the node from the VxVM device group, type the number that corresponds to the option for removing a node from a VxVM device group.

    Follow the prompts to remove the cluster node from the device group. You are asked for information about the following:

    • VxVM device group

    • Node name

  6. Verify that the node has been removed from the VxVM device group or groups.


    # cldevicegroup show devicegroup
    

Example 5–28 SPARC: Removing a Node From a Device Group (VxVM)

This example shows the removal of the node named phys-schost-1 from the dg1 VxVM device group.


[Determine the VxVM device group for the node:]
# cldevicegroup show dg1

=== Device Groups === 

Device Group Name:                        dg1
  Type:                                     VXVM
  failback:                                 no
  Node List:                                phys-schost-1, phys-schost-2
  preferenced:                              no
  numsecondaries:                           1
  diskgroup names:                             dg1
[Become superuser and start the clsetup utility:]
# clsetup
 Select Device groups and volumes>Remove a node from a VxVM device group.

Answer the questions when prompted. 
You will need the following information.
  Name:            Example:
  VxVM device group name    dg1
  node names                phys-schost-1

[Verify that the cldevicegroup command executed properly:]
 cldevicegroup remove-node -n phys-schost-1 dg1
 
    Command completed successfully.
Dismiss the clsetup  Device Groups Menu and Main Menu.
[Verify that the node was removed:]
# cldevicegroup show dg1

=== Device Groups === 

Device Group Name:                        dg1
  Type:                                     VXVM
  failback:                                 no
  Node List:                                phys-schost-2
  preferenced:                              no
  numsecondaries:                           1
  device names:                             dg1

ProcedureHow to Remove a Node From a Raw-Disk Device Group

Use this procedure to remove a cluster node from the list of potential primaries of a raw-disk device group.

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.

  1. Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on a node in the cluster other than the node to remove.

  2. Identify the device groups that are connected to the node being removed, and determine which are raw-disk device groups.


    # cldevicegroup show -n nodename -t rawdisk +
    
  3. Disable the localonly property of each Local_Disk raw-disk device group.


    # cldevicegroup set -p localonly=false devicegroup
    

    See the cldevicegroup(1CL) man page for more information about the localonly property.

  4. Verify that you have disabled the localonly property of all raw-disk device groups that are connected to the node being removed.

    The Disk device group type indicates that the localonly property is disabled for that raw-disk device group.


    # cldevicegroup show -n nodename -t rawdisk -v + 
    
  5. Remove the node from all raw-disk device groups that are identified in Step 2.

    You must complete this step for each raw-disk device group that is connected to the node being removed.


    # cldevicegroup remove-node -n nodename devicegroup
    

Example 5–29 SPARC: Removing a Node From a Raw Device Group

This example shows how to remove a node (phys-schost-2) from a raw-disk device group. All commands are run from another node of the cluster (phys-schost-1).


[Identify the device groups connected to the node being removed, and determine which are raw-disk device groups:]
phys-schost-1# cldevicegroup show -n phys-schost-2 -t rawdisk -v +	
Device Group Name:                              dsk/d4
  Type:                                           Disk
  failback:                                       false
  Node List:                                      phys-schost-2
  preferenced:                                    false
  localonly:                                      false
  autogen                                         true
  numsecondaries:                                 1
  device names:                                   phys-schost-2

Device Group Name:                              dsk/d2
  Type:                                           VxVM
  failback:                                       true
  Node List:                                      pbrave2
  preferenced:                                    false
  localonly:                                      false
  autogen                                         true
  numsecondaries:                                 1
  diskgroup name:                                 vxdg1

Device Group Name:                              dsk/d1
  Type:                                           SVM
  failback:                                       false
  Node List:                                      pbrave1, pbrave2
  preferenced:                                    true
  localonly:                                      false
  autogen                                         true
  numsecondaries:                                 1
  diskset name:                                   ms1
(dsk/d4) Device group node list:  phys-schost-2
	(dsk/d2) Device group node list:  phys-schost-1, phys-schost-2
	(dsk/d1) Device group node list:  phys-schost-1, phys-schost-2
[Disable the localonly flag for each local disk on the node:]
phys-schost-1# cldevicegroup set -p localonly=false dsk/d4
[Verify that the localonly flag is disabled:]
phys-schost-1# cldevicegroup show -n phys-schost-2 -t rawdisk +   
 (dsk/d4) Device group type:          Disk
 (dsk/d8) Device group type:          Local_Disk
[Remove the node from all raw-disk device groups:]

phys-schost-1# cldevicegroup remove-node -n phys-schost-2 dsk/d4
phys-schost-1# cldevicegroup remove-node -n phys-schost-2 dsk/d2
phys-schost-1# cldevicegroup remove-node -n phys-schost-2 dsk/d1

ProcedureHow to Change Device Group Properties

The method for establishing the primary ownership of a device group is based on the setting of an ownership preference attribute called preferenced. If the attribute is not set, the primary owner of an otherwise unowned device group is the first node that attempts to access a disk in that group. However, if this attribute is set, you must specify the preferred order in which nodes attempt to establish ownership.

If you disable the preferenced attribute, then the failback attribute is also automatically disabled. However, if you attempt to enable or re-enable the preferenced attribute, you have the choice of enabling or disabling the failback attribute.

If the preferenced attribute is either enabled or re-enabled, you are required to reestablish the order of nodes in the primary ownership preference list.

This procedure uses clsetup to set or unset the preferenced attribute and the failback attribute for Solaris Volume Manager or VxVM device groups.

Before You Begin

To perform this procedure, you need the name of the device group for which you are changing attribute values.

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.

  1. Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on any node of the cluster.

  2. Start the clsetup utility.


    # clsetup
    

    The Main Menu is displayed.

  3. To work with device groups, type the number that corresponds to the option for device groups and volumes.

    The Device Groups Menu is displayed.

  4. To change key properties of a device group, type the number that corresponds to the option for changing key properties of a VxVM or Solaris Volume Manager device group).

    The Change Key Properties Menu is displayed.

  5. To change a device group property, type the number that corresponds to the option for changing the preferences and/or failback properties.

    Follow the instructions to set the preferenced and failback options for a device group.

  6. Verify that the device group attributes have been changed.

    Look for the device group information displayed by the following command.


    # cldevicegroup show -v devicegroup 
    

Example 5–30 Changing Device Group Properties

The following example shows the cldevicegroup command generated by clsetup when it sets the attribute values for a device group (dg-schost-1).


# cldevicegroup set -p preferenced=true -p failback=true -p numsecondaries=1 \
-p nodelist=phys-schost-1,phys-schost-2 dg-schost-1
# cldevicegroup show dg-schost-1

=== Device Groups ===                          

Device Group Name:                        dg-schost-1
  Type:                                     SVM
  failback:                                 yes
  Node List:                                phys-schost-1, phys-schost-2
  preferenced:                              yes
  numsecondaries:                           1
  diskset names:                             dg-schost-1

ProcedureHow to Set the Desired Number of Secondaries for a Device Group

The numsecondaries property specifies the number of nodes within a device group that can master the group if the primary node fails. The default number of secondaries for device services is one. You can set the value to any integer between one and the number of operational nonprimary provider nodes in the device group.

This setting is an important factor in balancing cluster performance and availability. For example, increasing the desired number of secondaries increases the device group's opportunity to survive multiple failures that occur simultaneously within a cluster. Increasing the number of secondaries also decreases performance regularly during normal operation. A smaller number of secondaries typically results in better performance, but reduces availability. However, a larger number of secondaries does not always result in greater availability of the file system or device group in question. Refer to Chapter 3, Key Concepts for System Administrators and Application Developers, in Sun Cluster Concepts Guide for Solaris OS for more information.

If you change the numsecondaries property, secondary nodes are added or removed from the device group if the change causes a mismatch between the actual number of secondaries and the desired number.

This procedure uses the clsetup utility to set the numsecondaries property for all types of device groups. Refer to cldevicegroup(1CL) for information about device group options when configuring any device group.

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.

  1. Become superuser or assume a role that provides solaris.cluster.read and solaris.cluster.modify RBAC authorization on any node of the cluster.

  2. Start the clsetup utility.


    # clsetup
    

    The Main Menu is displayed.

  3. To work with device groups, select the option labeled Device groups and volumes.

    The Device Groups Menu is displayed.

  4. To change key properties of a device group, select the option labeled Change key properties of a device group.

    The Change Key Properties Menu is displayed.

  5. To change the desired number of secondaries, type the number that corresponds to the option for changing the numsecondaries property.

    Follow the instructions and type the desired number of secondaries to be configured for the device group. The corresponding cldevicegroup command is then executed, a log is printed, and the utility returns to the previous menu.

  6. Validate the device group configuration.


    # cldevicegroup show dg-schost-1
    === Device Groups ===                          
    
    Device Group Name:                    dg-schost-1
      Type:                                 VxVm  This might also be SDS or Local_Disk.
      failback:                             yes
      Node List:                            phys-schost-1, phys-schost-2 phys-schost-3
      preferenced:                          yes
      numsecondaries:                       1
      diskgroup names:                         dg-schost-1

    Note –

    If you change any configuration information for a VxVM disk group or volume that is registered with the cluster, you must reregister 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 Device Namespace.


  7. Verify that the device group attribute has been changed.

    Look for the device group information that is displayed by the following command.


    # cldevicegroup show -v devicegroup 
    

Example 5–31 Changing the Desired Number of Secondaries (Solaris Volume Manager)

The following example shows the cldevicegroup command that is generated by clsetup when it configures the desired number of secondaries for a device group (dg-schost-1). This example assumes that the disk group and volume were created previously.


# cldevicegroup set -p numsecondaries=1 dg-schost-1
# cldevicegroup show -v dg-schost-1

=== Device Groups ===                          

Device Group Name:                        dg-schost-1
  Type:                                     SVM
  failback:                                 yes
  Node List:                                phys-schost-1, phys-schost-2
  preferenced:                              yes
  numsecondaries:                           1
  diskset names:                             dg-schost-1


Example 5–32 SPARC: Setting the Desired Number of Secondaries (Veritas Volume Manager)

The following example shows the cldevicegroup command that is generated by clsetup when it sets the desired number of secondaries for a device group (dg-schost-1) to two. See How to Set the Desired Number of Secondaries for a Device Group for information about changing the desired number of secondaries after a device group is created.


# cldevicegroup set -p numsecondaries=2 dg-schost-1

# cldevicegroup show dg-schost-1
=== Device Groups ===                          

Device Group Name:                        dg-schost-1
  Type:                                     VxVM
  failback:                                 yes
  Node List:                                phys-schost-1, phys-schost-2
  preferenced:                              yes
  numsecondaries:                           1
  diskgroup names:                             dg-schost-1 


Example 5–33 Setting the Desired Number of Secondaries to the Default Value

The following example shows use of a null string value to configure the default number of secondaries. The device group will be configured to use the default value, even if the default value changes.


# cldevicegroup set -p numsecondaries= dg-schost-1
# cldevicegroup show -v dg-schost-1

=== Device Groups ===                          

Device Group Name:                        dg-schost-1
  Type:                                     SVM
  failback:                                 yes
  Node List:                                phys-schost-1, phys-schost-2 phys-schost-3
  preferenced:                              yes
  numsecondaries:                           1
  diskset names:                             dg-schost-1

ProcedureHow to List a Device Group Configuration

You do not need to be superuser to list the configuration. However, you do need solaris.cluster.read authorization.

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.

  1. Use one method from the following list.

    Sun Cluster Manager GUI

    See the Sun Cluster Manager online help for more information.

    cldevicegroup show

    Use cldevicegroup show to list the configuration for all device groups in the cluster.

    cldevicegroup show devicegroup

    Use cldevicegroup show devicegroup to list the configuration of a single device group.

    cldevicegroup status devicegroup

    Use cldevicegroup status devicegroup to determine the status of a single device group.

    cldevicegroup status +

    Use cldevicegroup status + to determine the status of all device groups in the cluster.

    Use the -v option with any of these commands to obtain more detailed information.


Example 5–34 Listing the Status of All Device Groups


# cldevicegroup status +

=== Cluster Device Groups ===

--- Device Group Status ---

Device Group Name    Primary         Secondary        Status
-----------------    -------         ---------        ------
dg-schost-1          phys-schost-2   phys-schost-1    Online
dg-schost-2          phys-schost-1   --               Offline
dg-schost-3          phys-schost-3   phy-shost-2      Online


Example 5–35 Listing the Configuration of a Particular Device Group


# cldevicegroup show dg-schost-1

=== Device Groups ===                          

Device Group Name:                              dg-schost-1
  Type:                                           SVM
  failback:                                       yes
  Node List:                                      phys-schost-2, phys-schost-3
  preferenced:                                    yes
  numsecondaries:                                 1
  diskset names:                                   dg-schost-1

ProcedureHow to Switch the Primary for a Device Group

This procedure can also be used to start (bring online) an inactive device group.

You can also bring an inactive device group online or switch the primary for a device group by using the Sun Cluster Manager GUI. See the Sun Cluster Manager online help for more information.

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.

  1. Become superuser or assume a profile that provides solaris.cluster.modify RBAC authorization on any node of the cluster.

  2. Use cldevicegroup switch to switch the device group primary.


    # cldevicegroup switch -n nodename devicegroup 
    
    -n nodename

    Specifies the name of the node to switch to. This node become the new primary.

    devicegroup

    Specifies the device group to switch.

  3. Verify that the device group has been switched to the new primary.

    If the device group is properly registered, information for the new device group is displayed when you use the following command.


    # cldevice status devicegroup
    

Example 5–36 Switching the Primary for a Device Group

The following example shows how to switch the primary for a device group and verify the change.


# cldevicegroup switch -n phys-schost-1 dg-schost-1

# cldevicegroup status dg-schost-1

=== Cluster Device Groups ===

--- Device Group Status ---

Device Group Name    Primary        Secondary       Status
-----------------    -------        ---------       ------
dg-schost-1          phys-schost-1   phys-schost-2  Online

ProcedureHow to Put a Device Group in Maintenance State

Putting a device group in maintenance state prevents that device group from automatically being brought online whenever one of its devices is accessed. You should put a device group in maintenance state when completing repair procedures that require that all I/O activity be acquiesced until completion of the repair. Putting a device group in maintenance state also helps prevent data loss by ensuring that a device group is not brought online on one node while the disk set or disk group is being repaired on another node.


Note –

Before a device group can be placed in maintenance state, all access to its devices must be stopped, and all dependent file systems must be unmounted.


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.

  1. Place the device group in maintenance state.

    1. If the device group is enabled, disable the device group.


      # cldevicegroup disable devicegroup
      
    2. Take the device group offline.


      # cldevicegroup offline devicegroup
      
  2. If the repair procedure being performed requires ownership of a disk set or disk group, manually import that disk set or disk group.

    For Solaris Volume Manager:


    # metaset -C take -f -s diskset
    

    Caution – Caution –

    If you are taking ownership of a Solaris Volume Manager disk set, you must use the metaset -C take command when the device group is in maintenance state. Using metaset -t brings the device group online as part of taking ownership. If you are importing a VxVM disk group, you must use the -t flag when importing the disk group. Using the -t flag prevents the disk group from automatically being imported if this node is rebooted.


    For Veritas Volume Manager:


    # vxdg -t import disk-group-name
    
  3. Complete the repair procedure that you need to perform.

  4. Release ownership of the disk set or disk group.


    Caution – Caution –

    Before taking the device group out of maintenance state, you must release ownership of the disk set or disk group. Failure to release ownership can result in data loss.


    • For Solaris Volume Manager:


      # metaset -C release -s diskset
      
    • For Veritas Volume Manager:


      # vxdg deport diskgroupname
      
  5. Bring the device group online.


    # cldevicegroup online devicegroup
    # cldevicegroup enable devicegroup
    

Example 5–37 Putting a Device Group in Maintenance State

This example shows how to put device group dg-schost-1 in maintenance state, and remove the device group from maintenance state.


[Place the device group in maintenance state.]
# cldevicegroup disable dg-schost-1
# cldevicegroup offline dg-schost-1 
[If needed, manually import the disk set or disk group.]
For Solaris Volume Manager:
  # metaset -C take -f -s dg-schost-1
For Veritas Volume Manager:
  # vxdg -t import dg1
  
[Complete all necessary repair procedures.]
  
[Release ownership.]
For Solaris Volume Manager:
  # metaset -C release -s dg-schost-1
For Veritas Volume Manager:
  # vxdg deport dg1
  
[Bring the device group online.]
# cldevicegroup online dg-schost-1
# cldevicegroup enable dg-schost-1