Platform Notes: Using luxadm Software

Volume Manager Operations

Adding a Disk Drive

This section describes how to use Volume Manager to configure your system when you add a disk drive while the power is on and the operating system is running.


Caution - Caution -

These procedures should be performed only by a qualified system administrator. Performing hot-plug operations on an active disk drive may result in data loss and/or data corruption.


You must create a new device entry for the drive in the /devices and /dev/dsk and /dev/rdsk hierarchy. The new drive is assigned a name associated with the slot into which the drive was installed.

  1. Select any available slot in the StorEdge A5000 disk array for the new disk drive.

    For reference when you configure the software environment, make a note of which enclosure and slot you choose.

  2. Use the luxadm insert_device command to add the new device.

    This command is interactive. You will be guided through the procedure for inserting a new device or chain of devices.


    # luxadm insert_device macs1,f1
    
    
    The list of devices which will be inserted is:
      1: Box Name "macs1" front slot 1
    
    Please enter 'q' to Quit or <Return> to Continue: 
    
    
    Hit <Return> after inserting the device(s).

  3. Insert the disk drive and hit Return.

    The following is displayed:


     Drive in Box Name "macs1" front slot 1
      Logical Nodes under /dev/dsk and /dev/rdsk :
    	c2t1d0s0
    	c2t1d0s1
    	c2t1d0s2
    	c2t1d0s3
    	c2t1d0s4
    	c2t1d0s5
    	c2t1d0s6
    	c2t1d0s7
    #

    The new disk drive is now available for use as a block or character device. Refer to the sd(7)man page for further details.

  4. Configure the Volume Manager to recognize the disk drive.


    # vxdctl enable
    

  5. Add the new disk to a new or existing Volume Manager disk group:


    # vxdiskadd cwtxdysz
    

    where: cwtxdysz is the new disk.

Refer to the vxdiskadd(1M) man page for further details.

The disk is now ready for use with Volume Manager as part of a new volume, added to an existing volume as a plex, or to increase an existing volume. Refer to your Sun StorEdge Volume Manager User's Guide for more information.

Replacing a Disk Drive

This section describes how on using Volume Manager to configuring your system to replace a disk drive while the power is on and the operating system is running.


Caution - Caution -

These procedures should be performed only by a qualified system administrator. Performing hot-plug operations on an active disk drive can result in data loss and/or data corruption.


Terminate all user- and application-level processes on all volumes, plexes, and/or subdisks that are located on the drive to be removed before performing this procedure.

Preparing to Replace the Disk Drive

  1. Identify the faulty disk drive.

    Different applications provide various levels of error logging. In general, you can find messages about failing or failed disks in your system console window. The information is also logged in the /usr/adm/messages file(s). See the documentation that came with your application for more information.

  2. Back up your system.

  3. Refer to the documentation that came with your system for backup details.

  4. Identify the disk media name for the disk you intend to replace.


    # vxdisk list | grep cwtxdysz
    

    For example, if the disk to be removed is c2t1d0, enter:


    # vxdisk list | grep c0t1d0
    c2t1d0s2     sliced    disk01       rootdg       online

    The disk media name is the third field in the output above: disk01.

    You can use the vxdiskadm utility to prepare the disk for replacement.

  5. Type vxdiskadm in a shell.


    # vxdiskadm
    

    This operation is interactive and requires user confirmation of the operation.

  6. Select the "Remove a disk for replacement" option.

    When prompted for a disk name to replace, type the disk media name from Step 4.

    vxdiskadm marks the disk for replacement and saves the subdisk information to be rebuilt on the replacement disk.

    Redundant data is automatically recovered after the replacement disk has been reattached to Volume Manager. Nonredundant data is identified as unusable and must be re-created from backups.

    Refer to the vxdiskadm(1M) man page for further details.

  7. Quit the vxdiskadm utility.

Replacing the Disk Drive

  1. Use the luxadm remove_device command to remove the disk.

    The luxadm remove_device command is interactive. You will be guided through the procedure for removing a device or chain of devices.


    # luxadm remove_device macs1,f1
    
    
      WARNING!!! Please ensure that no filesystems are mounted
    on these device(s).
      All data on these devices should have been backed up.
    
    
    
    The list of devices which will be removed is:
    
      1: Box Name "macs3" rear slot 1
    
    Please enter 'q' to Quit OR <Return> to Continue: 
    
    stopping:  Drive in "macs1" front slot 1....Done 
    offlining: Drive in "macs1" front slot 1....Done
    
    Hit <Return> after removing the device(s).
    

  2. Remove the disk drive and then hit any key.


    Note -

    The yellow LED on the designated disk drive(s) should be flashing.


    The following is displayed:


     
    Drive in Box Name "macs1" front slot 1
        Removing Logical Nodes: 
    	Removing c2t18d0s0
    	Removing c2t18d0s1
    	Removing c2t18d0s2
    	Removing c2t18d0s3
    	Removing c2t18d0s4
    	Removing c2t18d0s5
    	Removing c2t18d0s6
    	Removing c2t18d0s7
    #
    

  3. Use the luxadm insert_device command to add the new device.

    This command is interactive. You will be guided through the procedure for inserting a new device or chain of devices.


    # luxadm insert_device macs1,f1
    
    The list of devices which will be inserted is:
      1: Box Name "macs1" front slot 1
    
    Please enter 'q' to Quit or <Return> to Continue: 
    
    Hit <Return> after inserting the device(s).

  4. Insert the disk drive and then hit Return.

    The following is displayed:


      Drive in Box Name "macs1" front slot 1
      Logical Nodes under /dev/dsk and /dev/rdsk :
    	c2t1d0s0
    	c2t1d0s1
    	c2t1d0s2
    	c2t1d0s3
    	c2t1d0s4
    	c2t1d0s5
    	c2t1d0s6
    	c2t1d0s7
    #
    

The new disk drive is now available for use as a block or character device. Refer to the sd(7) man page for further details.

Recreating a Volume Manager Configuration on the New Drive

To re-create the replaced disk on the new drive:

  1. Configure the Volume Manager to recognize the disk drive.


    # vxdctl enable
    

  2. Use the vxdiskadm utility to replace the failed disk.

    Select the "Replace a failed or removed disk" option.

    This operation requires user confirmation. When prompted for a disk name to replace, use the disk media name from Step 4 of "Preparing to Replace the Disk Drive".

    vxdiskadm supplies a list of available disks to be used as replacements.

  3. Select the replacement drive.

    vxdiskadm automatically configures the replacement drive to match the failed drive.

    Redundant data is recovered automatically. Space for nonredundant data is created and identified. Nonredundant data must be recovered from backing store.

    See the vxdiskadm man page for further details.

Removing a Disk Drive

This section describes how to configure your system to remove a disk drive while the power is on and the operating system is running. Use the procedures in this section if you do not intend to replace the disk drive.

You must select the disk and stop any activity or applications on it, unmount it, physically remove the drive, and configure the Solaris environment to recognize that the drive is no longer there. You must then configure your application to operate without this device in place.


Caution - Caution -

These procedures should be performed only by a qualified system administrator. Performing hot-plug operations on an active disk drive can result in data loss and/or data corruption.


Preparing to Remove the Disk Drive

  1. Back up your system.

  2. Identify the disk media name for the disk you intend to remove.


    # vxdisk list | grep cwtxdysz
    

    For example, if the disk to be removed is c2t1d0, enter:


    # vxdisk list | grep c2t1d0
    c2t1d0s2     sliced    disk01       rootdg       online

    The disk media name is the third field in the output above: disk01.

    You can use the vxdiskadm utility to prepare the disk for removal.

  3. Type vxdiskadm in a shell.

    For example:


    # vxdiskadm
    

    This operation is interactive and requires user confirmation of the operation.

  4. Select the "Remove a disk" option.

    When prompted for a disk name to remove, type the disk media name from Step 2.

    vxdiskadm marks the disk to be removed.

    Refer to the vxdiskadm(1M) man page for further details.

Removing the Disk Drive

  1. Use the luxadm remove_device command to remove the disk.

    The luxadm remove_device command is interactive. You will be guided through the procedure for removing a device or chain of devices.


    # luxadm remove_device /dev/rdsk/c2t1d0s2
    
    
      WARNING!!! Please ensure that no filesystems are mounted
    on these device(s).
      All data on these devices should have been backed up.
    
    
    
    The list of devices which will be removed is:
      1: Box Name "macs1" front slot 1
    
    Please enter 'q' to Quit or <Return> to Continue: 
    
    stopping:  Drive in "macs1" front slot 1....Done
    offlining: Drive in "macs1" front slot 1....Done
    
    Hit <Return> after removing the device(s).
    

  2. Remove the disk drive and then hit any key.


    Note -

    The yellow LED on the designated disk drive(s) should be flashing.


    The following is displayed:


     
    Drive in Box Name "macs1" front slot 1
        Removing Logical Nodes: 
    	Removing c2t1d0s0
    	Removing c2t1d0s1
    	Removing c2t1d0s2
    	Removing c2t1d0s3
    	Removing c2t1d0s4
    	Removing c2t1d0s5
    	Removing c2t1d0s6
    	Removing c2t1d0s7
    #