Sun Cluster System Administration Guide for Solaris OS

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–38 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