D    The voldiskadm Menu Interface

This appendix describes the voldiskadm menu interface that you can use to perform LSM disk and disk group operations. The menus are easy to use and provide information about each step to help you decide the correct response for each prompt.

D.1    Starting the voldiskadm Menu Interface

To start the voldiskadm menu interface, enter:


# voldiskadm

The following output is displayed:

1      Add or initialize one or more disks
2      Encapsulate one or more disks
3      Remove a disk
4      Remove a disk for replacement
5      Replace a failed or removed disk
6      Mirror volumes on a disk
7      Move volumes from a disk
8      Enable access to (import) a disk group
9      Remove access to (deport) a disk group
10     Enable (online) a disk device
11     Disable (offline) a disk device
12     Mark a disk as a spare for a disk group
13     Turn off the spare flag on a disk
14     Recover plexes and volumes after disk replacement
list   List disk information
?      Display help about menu
??     Display help about the menuing system
q      Exit from menus

D.2    Disk Management

This section describes the disk management available with the voldiskadm menu interface.

D.2.1    Initializing a Disk

Disk initialization identifies a disk to LSM and prepares the disk for LSM use. This operation involves installing a disk header and writing an empty configuration on the disk. A disk access record is created for the disk, unless such a record already exists.

Note

A disk must contain a disklabel before you can initialize it for LSM use.

To initialize a disk for use with the LSM software, perform the following steps:

  1. At the main menu prompt, select menu item 1 to enable the "Add or initialize one or more disk" operation.

  2. At the prompt on the following "Add or initialize one or more disk" screen, enter the address of the disk to be added. If you do not know the address of the disk you want to add, enter the letter l or type the word list at the prompt. LSM displays a list of the disks that are on the system. For example:

    Select disk devices to add:
     
    [<space-separated disk list>,<disk>,list,q,?] list
     
    DEVICE       DISK         GROUP        STATUS
    dsk2         dsk2         rootdg       online
    dsk3         dsk3         rootdg       online
    dsk4         dsk4         rootdg       online
    dsk5         dsk5         rootdg       online
    dsk6         -            -            online
    dsk7         -            -            online
    dsk8         -            -            unknown
      :
    

  3. Once you have entered the disk name, LSM displays this screen that asks you to supply the name of the disk group you want the disk to be a part of:

    Which disk group [<group>,none,list,q,?] (default: rootdg)
    

    You can:

  4. Depending on your response to the "Which disk group..." prompt, LSM displays one of the following screens.

    Press the Return key to continue.

  5. If LSM successfully completes the disk initialization, the following appears:

    Add or initialize other disks? [y,n,q,?] (default: n)
     
    

    If the fstype in the disk label of the specified partition or an overlapping partition is set, LSM displays a warning message to inform you that initializing the disk might destroy existing data.

    If you are sure that the disk partition has no valid data and that the partition can be added to LSM, you can ignore the warning message and answer y to the prompt. The voldiskadm utility then proceeds to initialize the disk partition and add it to LSM.

    If the disk cannot be initialized because the specified partition or an overlapping partition on the disk is open (that is, a partition is actively in use by UFS, AdvFS, LSM or swap), the initialization process fails and voldiskadm issues an error message informing you of the problem.

D.2.2    Displaying Disk Information

The following steps describe how to find information about disks available on the system.

  1. From the main menu, enter the letter l or type the word list to display a list of disks available on the system.

    LSM displays a list of devices similar to the following screen, and prompts you to enter the address of the disk for which you want to obtain detailed information.

    Select an operation to perform: list
     
    List disk information
    Menu: VolumeManager/Disk/ListDisk
     
    Use this menu operation to display a list of disks.  You can
    also choose to list detailed information about the disk at
    a specific disk device address.
     
    Enter disk device or "all" [<address>,all,q,?] (default: all) 
     
    DEVICE       DISK         GROUP        STATUS
    dsk2         dsk2         rootdg       online
    dsk3         dsk3         rootdg       online
    dsk4         dsk4         rootdg       online
    dsk5         dsk5         rootdg       online
    dsk6         -            -            online
    dsk7         -            -            online
    dsk8         disk01       rootdg       online
    	:
    

  2. The following screen displays information for the disk called dsk8:

    Device to list in detail [<address>,none,q,?] (default: none) dsk8
     
    Device:    dsk8
    devicetag: dsk8
    type:      sliced
    hostid:    rio.dec.com
    disk:      name=disk01 id=922907065.1771.rio.dec.com
    group:     name=rootdg id=921709207.1025.rio.dec.com
    flags:     online ready autoimport imported
    pubpaths:  block=/dev/disk/dsk8g char=/dev/rdisk/dsk8g
    privpaths: block=/dev/disk/dsk8h char=/dev/rdisk/dsk8h
    version:   2.1
    iosize:    min=512 (bytes) max=32768 (blocks)
    public:    slice=6 offset=16 len=4106368
    private:   slice=7 offset=0 len=4096
    update:    time=922907069 seqno=0.5
    headers:   0 248
    configs:   count=1 len=2993
    logs:      count=1 len=453
    Defined regions:
     config   priv     17-   247[   231]: copy=01 offset=000000 enabled
      config   priv    249-  3010[  2762]: copy=01 offset=000231 enabled
     log      priv   3011-  3463[   453]: copy=01 offset=000000 enabled
     
    List another disk device? [y,n,q,?] (default: n)
    

  3. Press the Return key to return to the main menu.

D.2.3    Adding a Disk to a Disk Group

You may want to add a new disk to an already established disk group. Perhaps the current disks have insufficient space for the project or work group requirements, especially if these requirements have changed.

Follow these steps to add a disk to a disk group:

  1. Follow the instructions documented in steps 1 and 2 in Section D.2.1.

  2. When the add disk operation adds a disk to a disk group, LSM checks to see if the disk is already initialized. If the disk is initialized, LSM displays the following screen and asks whether or not you want to reinitialize the disk:

    Which disk group [<group>,none,list,q,?] (default: rootdg) dg1
     
        The default disk name that will be assigned is:
     
        dg101
     
      Use this default disk name for the disk? [y,n,q,?] (default: y) y
     
      Add disk as a spare disk for dg1? [y,n,q,?] (default: n) n
     
        The selected disks will be added to the disk group dg1 with the
        default disk names.
     
        dsk8
     
        Continue with operation? [y,n,q,?] (default: y) y
     
          The following disk device appears to have been initialized already.
          The disk is currently available as a replacement disk.
     
         dsk8
     
        Use this device? [y,n,q,?] (default: y) 
     
        The following disk you selected for use appears to already have
        been initialized for the Logical Storage Manager.  If you are
        certain the disk has already been initialized for the Logical
        Storage Manager, then you do not need to reinitialize the disk
        device.
     
    dsk8
     
      Reinitialize this device? [y,n,q,?] (default: y)
    

Use the information in the following table to determine whether or not you should reinitialize the disk.

If... Then...
The disk is new Initialize the disk before placing it under the control of LSM.
The disk was previously in use and contains useful data Do not initialize the disk. Instead, use the LSM encapsulation function to add the disk to the LSM system while still preserving the existing data.
The disk was previously in use but it does not contain useful data Initialize the disk before placing the disk under LSM control.

D.2.4    Moving Volumes from a Disk

Before you disable or remove a disk, you may want to move the data from that disk to other disks on the system. Use this operation immediately prior to removing a disk, either permanently or for replacement (described in Section D.2.5).

Note

Simply moving volumes off of a disk without also removing the disk, does not prevent volumes from being moved onto the disk by future operations. For example, two consecutive move operations could move volumes from one disk to another and then back. Also note that you need to make sure the other disks in the disk group have sufficient space available.

To move volumes from a disk, do the following:

  1. Select menu item 7 from the main menu.

  2. From the "Move volumes from a disk" screen, enter the name of the disk whose volumes you want to move:

    Use this menu operation to move any volumes that are using a
    disk onto other disks.  Use this menu immediately prior to
    removing a disk, either permanently or for replacement.  You can
    specify a list of disks to move volumes onto, or you can move the
    volumes to any available disk space in the same disk group.
     
        NOTE:  Simply moving volumes off of a disk, without also removing
               the disk, does not prevent volumes from being moved onto
               the disk by future operations.  For example, using two
               consecutive move operations may move volumes from the
               second disk to the first.
     
      Enter disk name [<disk>,list,q,?] dsk5
    

  3. Enter the name of the disk that the volumes should be moved to:

    You can now specify a list of disks to move onto.  Specify a list
    of disk media names (e.g., rootdg01) all on one line separated by
    blanks.  If you do not enter any disk media names, then the volumes
    will be moved to any available space in the disk group.
     
    Enter disks [<disk ...>,list,q,?] dsk4
     
        Requested operation is to move all volumes from disk dsk5 in
        group rootdg.
     
          NOTE: This operation can take a long time to complete.
     
    Continue with operation? [y,n,q,?] (default: y) y
    

  4. As LSM moves the volumes from the disk, it displays the status of the operation:

    Move volume v1 ...
    

  5. When the volumes have all been moved, LSM displays the following:

    Evacuation of disk dsk5 is complete.      
    Move volumes from another disk? [y,n,q,?] (default: n)
    

D.2.5    Removing a Disk from a Disk Group

This operation involves removing the LSM disk associated with the selected partitions from LSM control by removing the associated disk access records. The voldiskadm menu interface provides two methods for removing disks. These two operations remove a disk as follows:

See Section D.2.4, which describes how to move data from a disk to another disk on the system, and see Section D.2.6, which describes how to replace a failed or removed disk.

Note

You must disable the disk group before you can remove the last disk in that group. Disabling a disk group, also referred to as deporting a disk group, is described in Section D.3.2.

D.2.5.1    Removing a Disk Without Replacement

To remove a disk from its disk group, perform the following steps:

  1. Select menu item 3 from the main menu.

  2. LSM displays the following "Remove a disk" screen and prompts you to enter the disk name of the disk to be removed.

    Use this operation to remove a disk from a disk group.  This
    operation takes, as input, a disk name.  This is the same name
    that you gave to the disk when you added the disk to the disk
    group.
     
      Enter disk name [<disk>,list,q,?] dsk5
    

    The example removes a disk called dsk5.

  3. LSM displays a verification screen and asks whether or not to continue:

    Requested operation is to remove disk dsk5 from group rootdg.
     
      Continue with operation? [y,n,q,?] (default: y)
    

    Press the Return key to continue.

  4. LSM removes the disk from the disk group and then displays the following screen when the operation has completed:

    Removal of disk dsk5 is complete.
     
      Remove another disk? [y,n,q,?] (default: n)
    

    Press the Return key to return to the main menu.

D.2.5.2    Removing a Disk for Replacement

You may occasionally need to replace a disk in a disk group. This operation involves initializing the disk for LSM use, and replacing the old disk and associated disk media records with the new disk and its information. Perform the following steps to replace a disk while retaining the disk name:

  1. Select menu item 4 from the main menu. LSM displays the "Remove a disk for replacement" screen.

  2. Enter the name of the disk to be replaced if you know it. Otherwise, enter the letter l for a list of disks. LSM displays a screen similar to the following:

    Use this menu operation to remove a physical disk from a disk
    group, while retaining the disk name.  This changes the state
    for the disk name to a "removed" disk.  If there are any
    initialized disks that are not part of a disk group, you will be
    given the option of using one of these disks as a replacement.
     
     
      Enter disk name [<disk>,list,q,?]
    

  3. If this operation does not need to disable a volume in order to replace the disk, the following is displayed:

    The following volumes will lose mirrors as a result of this          
    operation:   
     
    v1           
     
     No data on these volumes will be lost.           
     
    If this operation must disable a volume in order to replace the disk,        
    the following will be displayed:             
     
    The following volumes will be disabled as a result of this           
    operation:                   
     
    v1             
     
    These volumes will require restoration from backup.             
     
    Are you sure you want to do this? [y,n,q,?] (default: n)    	 
     
    Warning: Disabling a volume that is currently open and in use  		  
    will return I/O errors back to the file system or  		  
    application using that volume.  Disabling a volume  		  
    that contains a mounted file system may crash the  		  
    system.  Refer to section C.2.4 on how to move  		  
    volumes off a disk before removing the disk.
    

  4. If there are any initialized disks available that are not part of a disk group, LSM displays the following screen and gives you the option of using one of these disks as a replacement. Select the replacement disk from the list provided. Press the Return key if you want to use the default disk.

    The following devices are available as replacements:
     
                dsk5
     
          You can choose one of these disks now, to replace dsk4.
          Select "none" if you do not wish to select a replacement disk.
     
        Choose a device, or select "none"
        [<device>,none,q,?] (default: dsk5)
    

  5. LSM then displays the following verification screen:

    Requested operation is to remove disk dsk4 from group rootdg.
    The removed disk will be replaced with disk device dsk5.
     
    Continue with operation? [y,n,q,?] (default: y)
    

    Press the Return key to continue.

  6. When LSM successfully replaces the disk, LSM displays the following screen:

    Removal of disk dsk4 completed successfully.
     
    Proceeding to replace dsk4 with device dsk5.
     
    Disk replacement completed successfully.
     
    Remove another disk? [y,n,q,?] (default: n)
    

    Press the Return key to return to the main menu.

D.2.6    Replacing a Failed or Removed Disk

Use this menu operation to specify a replacement disk for a disk that you removed with the "Remove a disk for replacement" menu operation (see Section D.2.5.2), or for a disk that failed during use. To replace a disk, use the following instructions:

  1. Select menu item 5 from the main menu.

  2. The following screen asks you to enter the name of the disk to be replaced. You can choose an uninitialized diskto be used to replace the failed or removed disk:

    replace the failed or removed disk:
     
        Use this menu operation to specify a replacement disk for a disk
        that you removed with the "Remove a disk for replacement" menu
        operation, or that failed during use.  You will be prompted for
        a disk name to replace and a disk device to use as a replacement.
        You can choose an uninitialized disk, in which case the disk will
        be initialized, or you can choose a disk that you have already
        initialized using the Add or initialize a disk menu operation.
     
     
      Select a removed or failed disk [<disk>,list,q,?] list
     
      Disk group: rootdg
     
      DM NAME         DEVICE       TYPE     PRIVLEN  PUBLEN   STATE  
     
      dm dsk5         -            -        -        -        NODEVICE
     
      Select a removed or failed disk [<disk>,list,q,?] dsk5
     
      Select disk device to initialize [<address>,list,q,?] list
     
      DEVICE       DISK         GROUP        STATUS
      dsk2         dsk2         rootdg       online
      dsk3         dsk3         rootdg       online
      dsk4         dsk4         rootdg       online
      dsk5         -            -            online
      dsk10        -            -            unknown
     
     
      Select disk device to initialize [<address>,list,q,?] dsk10  
     
        The following disk device has a valid disk label, but does not appear to 
        have been initialized for the Logical Storage Manager.  If there is
        data on the disk that should NOT be destroyed you should encapsulate
        the existing disk partitions as volumes instead of adding the disk
        as a new disk.
     
        dsk10
     
      Initialize this device? [y,n,q,?] (default: y) y
     
        The requested operation is to initialize disk device dsk10 and
        to then use that device to replace the removed or failed disk
        dsk5 in disk group rootdg.
     
      Continue with operation? [y,n,q,?] (default: y) y
    

  3. LSM displays the following success screen:

    Replacement of disk dsk5 in group rootdg with disk device
        dsk10 completed successfully.
     
     Replace another disk? [y,n,q,?] (default: n)
    

    Press Return to return to the main menu.

D.2.7    Disabling a Disk

This operation places the disk access record in an offline state. During searches for disk IDs or members of a disk group, offline disks are ignored. To disable a disk, perform the following steps:

  1. Select menu item 11 from the main menu to disable (off line) a removable disk.

  2. On the next screen, select the disk you want to disable:

     Use this menu operation to disable all access to a disk device
     by the Logical Storage Manager.  This operation can be applied
     only to disks that are not currently in a disk group.  Use this
     operation if you intend to remove a disk from a system without
     rebooting.
     
        NOTE:  Many systems do not support disks that can be removed from
               a system during normal operation.  On such systems, the
               offline operation is seldom useful.
     
      Select a disk device to disable [<address>,list,q,?] dsk3
    

    This example shows that disk dsk3 has been selected.

  3. LSM disables disk dsk3 and then asks if you want to disable another device:

    Disable another device? [y,n,q,?] (default: n) 
     
    

    Press the Return key to return to the main menu.

D.3    Disk Group Management

This section describes the disk group management that you can perform with the the voldiskadm menu interface.

D.3.1    Importing a Disk Group

Use this menu operation to enable access by this system or cluster to a disk group. This operation can be used to move a disk group from one system to another. If you want to move a disk group from one system to another you must first disable (deport) it on the original system (see Section D.3.2), then move the disk between systems and enable (import) the disk group.

Note

If two hosts share a SCSI bus, make sure that the other host really failed or deported the disk group. If two hosts import a disk group at the same time, the disk group will be corrupted and become unusable.

To import a disk group, do the following:

  1. Select menu item 8 from the main menu. From the "Enable access to (import) a disk group" menu, select the name of the disk group to import:

    Use this operation to enable access to a disk group.  This can be
    used as the final part of moving a disk group from one system to
    another.  The first part of moving a disk group is to use the
    "Remove access to (deport) a disk group" operation on the
    original host.
     
    A disk group can be imported from another host that failed without
    first deporting the disk group.  Be sure that all disks in the disk
    group are moved between hosts.
     
    If two hosts share a SCSI bus, be very careful to ensure that the
    other host really has failed or has deported the disk group.  If
    two active hosts import a disk group at the same time, the disk
    group will be corrupted and will become unusable.
     
    Select disk group to import [<group>,list,q,?] (default: list) list
     
            GROUP: dg1 (id: 921709259.1071.rio.dec.com)
            DEVICES: 
                     dsk7
     
            GROUP: dg1 (id: 922382892.1625.rio.dec.com)
            DEVICES: 
                     dsk9
     
            GROUP: dg1 (id: 922908695.1779.rio.dec.com)
            DEVICES: 
                     dsk6
                     dsk8
     
      Select disk group to import [<group>,list,q,?] (default: list) dg1
    

  2. Once the import is complete, LSM displays the following success screen:

     The import of dg1 was successful.
     
     Select another disk group? [y,n,q,?] (default: n)
    

    Press Return to return to the main menu

D.3.2    Deporting a Disk Group

Use this operation to disable access to a disk group that is currently enabled (imported) by this system. Deport a disk group if you intend to move the disks in a disk group to another system. Also, deport a disk group if you want to use all of the disks remaining in a disk group for some new purpose.

Note

For removable disk devices on some systems, it is important to disable all access to the disk before removing the disk.

To deport a disk group, perform the following steps:

  1. Select menu item 9 from the main menu.

  2. From the following "Remove access to (deport) a disk group" menu, enter the name of the disk group to be deported:

    Use this menu operation to remove access to a disk group that
    is currently enabled (imported) by this system.  Deport a disk
    group if you intend to move the disks in a disk group to another
    system.  Also, deport a disk group if you want to use all of the
    disks remaining in a disk group for some new purpose.
     
    You will be prompted for the name of a disk group.  You will
    also be asked if the disks should be disabled (offlined).  For
    removable disk devices on some systems, it is important to
    disable all access to the disk before removing the disk.
     
    Enter name of disk group [<group>,list,q,?] (default: list) list
     
    GROUP        DISK/VOLUME         DEVICE/STATE LENGTH
     
    dg1          disk   dg101        dsk8         4106368
    dg1          disk   dsk6         dsk6         4109440
     
    Enter name of disk group [<group>,list,q,?] (default: list) dg1
    

  3. Verify that you want LSM to disable the disk group on the displayed confirmation screen:

    The requested operation is to disable access to the removable
    disk group named dg1.  This disk group is stored on the
    following disks:
     
              dsk6 on device dsk6
              dg101 on device dsk8
     
    You can choose to disable access to (also known as "offline")
    these disks.  This may be necessary to prevent errors if
    you actually remove any of the disks from the system.
     
    Disable (offline) the indicated disks? [y,n,q,?] (default: n) 
     
    Continue with operation? [y,n,q,?] (default: y) y
    

    Press Return to deport the disk group.

  4. Output similar to the following is displayed:

    Removal of disk group dg1 was successful.
     
    Disable another disk group? [y,n,q,?] (default: n)
    

D.4    Mirror Volume Management

You can only use the vvoldiskadm menu interface to mirror a volume. You cannot use the voldiskadm menu interface to mirror volumes that are already mirrored, or that are comprised of more than one subdisk.

To mirror volumes on a disk, make sure that the target disk has an equal or greater amount of space as the originating disk and then do the following:

  1. Select menu item 6 from the main menu.

  2. On the "Mirror volumes on a disk" menu, enter the name of the disk whose volumes you want to mirror:

    This operation can be used to mirror volumes on a disk.  The volumes 
    can be be mirrored onto another disk or onto any available disk space.
    Volumes will not be mirrored if they are already mirrored or contain 
    more than one subdisk.
     
    Mirroring the root and swap volumes from the boot disk will produce a
    disk that can be used as an alternate boot disk.
     
    At the prompt below, supply the disk media name containing the
    volumes to be mirrored.
     
    Enter disk name [<disk>,list,q,?] dsk5
    

  3. Select the target disk name (this disk must be the same size or larger than the originating disk). Volumes can be mirrored onto another disk or onto any available disk space.

    You can choose to mirror volumes from disk dsk5 onto any
    available disk space, or you can choose to mirror onto a specific
    disk.  To mirror to a specific disk, select the name of that disk.
    To mirror to any available disk space, select "any".
     
    Enter destination disk [<disk>,list,q,?] (default: any) dsk4
    

  4. LSM displays the verification screen. Press Return to make the mirror.

    The requested operation is to mirror all volumes on disk dsk5
    in disk group rootdg onto available disk space on disk dsk4.  
     
    There is space already allocated on disk dsk4.  If you don't
    want to mirror onto this disk, enter "n" at the next prompt and
    restart this operation from the beginning.
     
    NOTE: This operation can take a long time to complete.
     
    Continue with operation? [y,n,q,?] (default: y)
    

  5. LSM displays the status of the operation as it performs the mirroring,

     Mirroring of disk dsk5 is complete.
    

  6. Once LSM has completed the mirroring operation, it asks if you want to mirror volumes on another disk. Press Return to go back to the main menu.

    Mirror volumes on another disk? [y,n,q,?] (default: n) 
     
    

D.5    Exiting the voldiskadm Menu Interface

When you have completed all of your disk administration activities, exit the voldiskadm menu interface by selecting menu option q from the main menu.