Sun Cluster Software Installation Guide for Solaris OS

Creating Disk Groups in a Cluster

This section describes how to create VxVM disk groups in a cluster. The following table describes the types of VxVM disk groups you can configure in a Sun Cluster configuration and their characteristics.

Disk Group Type 

Use 

Registered with Sun Cluster? 

Storage Requirement 

VxVM disk group 

Device groups for failover or scalable data services, global devices, or cluster file systems 

Yes 

Shared storage 

Local VxVM disk group 

Applications that are not highly available and are confined to a single node 

No 

Shared or unshared storage 

VxVM shared disk group 

Oracle RAC (also requires the VxVM cluster feature) 

No 

Shared storage 

The following table lists the tasks to perform to create VxVM disk groups in a Sun Cluster configuration.

Table 5–2 Task Map: Creating VxVM Disk Groups

Task 

Instructions 

1. Create disk groups and volumes. 

How to Create a Disk Group

2. Register as Sun Cluster device groups those disk groups that are not local and that do not use the VxVM cluster feature. 

How to Register a Disk Group

3. If necessary, resolve any minor-number conflicts between device groups by assigning a new minor number. 

How to Assign a New Minor Number to a Device Group

4. Verify the disk groups and volumes. 

How to Verify the Disk Group Configuration

ProcedureHow to Create a Disk Group

Use this procedure to create your VxVM disk groups and volumes.

Perform this procedure from a node that is physically connected to the disks that make the disk group that you add.

Before You Begin

Perform the following tasks:

  1. Become superuser on the node that will own the disk group.

  2. Create the VxVM disk groups and volumes.

    Observe the following special instructions:


    Note –

    You can use Dirty Region Logging (DRL) to decrease volume recovery time if a node failure occurs. However, DRL might decrease I/O throughput.


  3. For local disk groups, set the localonly property and add a single node to the disk group's node list.


    Note –

    A disk group that is configured to be local only is not highly available or globally accessible.


    1. Start the clsetup utility.


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

    3. Choose the menu item, Set localonly on a VxVM disk group.

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

      Only one node at any time is permitted to master the disk group. You can later change which node is the configured master.

    5. When finished, quit the clsetup utility.

Next Steps

Determine your next step:

ProcedureHow to Register a Disk Group

If the VxVM cluster feature is not enabled, perform this procedure to register disk groups that are not local as Sun Cluster device groups.


Note –

SPARC: If the VxVM cluster feature is enabled or you created a local disk group, do not perform this procedure. Instead, proceed to How to Verify the Disk Group Configuration.


  1. Become superuser on a node of the cluster.

  2. Register the global disk group as a Sun Cluster device group.

    1. Start the clsetup utility.


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

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

    4. Follow the instructions to specify the VxVM disk group that you want to register as a Sun Cluster device group.

    5. When finished, quit the clsetup utility.

    6. Deport and re-import each local disk group.


      phys-schost# vxdg deport diskgroup
      # vxdg import dg
      
    7. Restart each local disk group.


      phys-schost# vxvol -g diskgroup startall
      
    8. Verify the local-only status of each local disk group.

      If the value of the flags property of the disk group is nogdl, the disk group is correctly configured for local-only access.


      phys-schost# vxdg list diskgroup | grep flags
      flags: nogdl
  3. Verify that the device group is registered.

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


    phys-schost# cldevicegroup status
    
Next Steps

Go to How to Verify the Disk Group Configuration.

Troubleshooting

Stack overflow – If a stack overflows when the device group is brought online, the default value of the thread stack size might be insufficient. On each node, add the entry set cl_haci:rm_thread_stacksize=0xsize to the /etc/system file, where size is a number greater than 8000, which is the default setting.

Configuration changes – If you change any configuration information for a VxVM device group or its volumes, you must register the configuration changes by using the clsetup utility. Configuration changes that you must register include adding or removing volumes and changing the group, owner, or permissions of existing volumes. See Administering Device Groups in Sun Cluster System Administration Guide for Solaris OS for procedures to register configuration changes that are made to a VxVM device group.

ProcedureHow to Assign a New Minor Number to a Device Group

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. Perform this procedure to reminor a disk group.

  1. Become superuser on a node of the cluster.

  2. Determine the minor numbers in use.


    phys-schost# ls -l /global/.devices/node@1/dev/vx/dsk/*
    
  3. Choose any other multiple of 1000 that is not in use to become the base minor number for the new disk group.

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


    phys-schost# vxdg reminor diskgroup base-minor-number
    

Example 5–2 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 reminors the new device group to use the base minor number 5000.


phys-schost# ls -l /global/.devices/node@1/dev/vx/dsk/*
/global/.devices/node@1/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@1/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
phys-schost# vxdg reminor dg3 5000

Next Steps

Register the disk group as a Sun Cluster device group. Go to How to Register a Disk Group.

ProcedureHow to Verify the Disk Group Configuration

Perform this procedure on each node of the cluster.

  1. Become superuser.

  2. List the disk groups.


    phys-schost# vxdisk list
    
  3. List the device groups.


    phys-schost# cldevicegroup list -v
    
  4. Verify that all disk groups are correctly configured.

    Ensure that the following requirements are met:

    • The root disk group includes only local disks.

    • All disk groups and any local disk groups are imported on the current primary node only.

  5. Verify that all volumes have been started.


    phys-schost# vxprint
    
  6. Verify that all disk groups have been registered as Sun Cluster device groups and are online.


    phys-schost# cldevicegroup status
    

    Output should not display any local disk groups.

  7. (Optional) Capture the disk partitioning information for future reference.


    phys-schost# prtvtoc /dev/rdsk/cNtXdYsZ > filename
    

    Store the file in a location outside the cluster. If you make any disk configuration changes, run this command again to capture the changed configuration. If a disk fails and needs replacement, you can use this information to restore the disk partition configuration. For more information, see the prtvtoc(1M) man page.

  8. (Optional) Make a backup of your cluster configuration. An archived backup of your cluster configuration facilitates easier recovery of the your cluster configuration. For more information, see How to Back Up the Cluster Configuration in Sun Cluster System Administration Guide for Solaris OS.

Guidelines for Administering VxVM Disk Groups

Observe the following guidelines for administering VxVM disk groups in a Sun Cluster configuration:

Troubleshooting

If the output of the cldevicegroup status command includes any local disk groups, the displayed disk groups are not configured correctly for local-only access. Return to How to Create a Disk Group to reconfigure the local disk group.

Next Steps

Determine from the following list the next task to perform that applies to your cluster configuration. If you need to perform more than one task from this list, go to the first of those tasks in this list.