Adding a disk to VxVM

Formatted disks being placed under VxVM control may be new or previously used outside VxVM. The set of disks can consist of all disks on the system, all disks on a controller, selected disks, or a combination of these.

Depending on the circumstances, all of the disks may not be processed in the same way.

When initializing multiple disks at one time, it is possible to exclude certain disks or certain controllers.

To exclude a device from the view of VxVM, select Prevent multipathing/Suppress devices from VxVM's view from the vxdiskadm main menu.

Warning:

Initialization does not preserve the existing data on the disks.

To initialize disks for VxVM use

  1. Select Add or initialize one or more disks from the vxdiskadm main menu.

  2. At the following prompt, enter the disk device name of the disk to be added to VxVM control (or enter list for a list of disks):

    Select disk devices to add:
    [<pattern-list>,all,list,q,?]

    The pattern-list can be a single disk, or a series of disks. If pattern-list consists of multiple items, separate them using white space. For example, specify four disks as follows:

    hdisk10 hdisk11 hdisk12 hdisk13

    If you enter list at the prompt, the vxdiskadm program displays a list of the disks available to the system:

    DEVICE       DISK         GROUP       STATUS
    hdisk0       -            -           LVM
    hdisk1       -            -           LVM
    hdisk2       -            -           LVM
    hdisk3       mydg01       mydg        online
    hdisk4       mydg03       mydg        online
    hdisk5       mydg04       mydg        online
    hdisk6       mydg05       mydg        online
    hdisk7       mydg06       mydg        online
    hdisk8       mydg07       mydg        online
    hdisk9       mydg02       mydg        online
    hdisk10      mydg08       mydg        online
    hdisk11      -            -           online invalid
    hdisk12      -            -           online

    The phrase online invalid in the STATUS line indicates that a disk has yet to be added or initialized for VxVM control. Disks that are listed as online with a disk name and disk group are already under VxVM control.

    Enter the device name or pattern of the disks that you want to initialize at the prompt and press Return.

  3. To continue with the operation, enter y (or press Return) at the following prompt:

    Here are the disks selected. Output format: [Device]
    list of device names
    
    Continue operation? [y,n,q,?] (default: y) y
    
  4. At the following prompt, specify the disk group to which the disk should be added, or none to reserve the disks for future use:

     You can choose to add these disks to an existing disk group, 
      a new disk group, or you can leave these disks available for use 
      by future add or replacement operations. To create a new disk 
      group, select a disk group name that does not yet exist. To
      leave the disks available for future use, specify a disk group
      name of none.
      
      Which disk group [<group>,none,list,q,?]
  5. If you specified the name of a disk group that does not already exist, vxdiskadm prompts for confirmation that you really want to create this new disk group:

    There is no active disk group named disk group name.
    
    Create a new group named disk group name? [y,n,q,?]
    (default: y)y

    You are then prompted to confirm whether the disk group should support the Cross-platform Data Sharing (CDS) feature:

    Create the disk group as a CDS disk group? [y,n,q,?]
    (default: n)

    If the new disk group may be moved between different operating system platforms, enter y. Otherwise, enter n.

  6. At the following prompt, either press Return to accept the default disk name or enter n to allow you to define your own disk names:

    Use default disk names for the disks? [y,n,q,?] (default: y) n
  7. When prompted whether the disks should become hot-relocation spares, enter n (or press Return):

    Add disks as spare disks for disk group name? [y,n,q,?]
    (default: n) n
  8. When prompted whether to exclude the disks from hot-relocation use, enter n (or press Return).

    Exclude disks from hot-relocation use? [y,n,q,?}
    (default: n) n
  9. You are next prompted to choose whether you want to add a site tag to the disks:

    Add site tag to disks? [y,n,q,?] (default: n)

    A site tag is usually applied to disk arrays or enclosures, and is not required unless you want to use the Remote Mirror feature.

    If you enter y to choose to add a site tag, you are prompted to the site name at step 11.

  10. To continue with the operation, enter y (or press Return) at the following prompt:

    The selected disks will be added to the disk group
    disk group name with default disk names.
    list of device names
    Continue with operation? [y,n,q,?] (default: y) y
  11. If you chose to tag the disks with a site in step 9, you are now prompted to enter the site name that should be applied to the disks in each enclosure:

    The following disk(s): 
    list of device names
    
    belong to enclosure(s):
    list of enclosure names 
    
    Enter site tag for disks on enclosure enclosure name
    [<name>,q,?] site_name
  12. If one or more disks already contains a file system, vxdiskadm asks if you are sure that you want to destroy it. Enter y to confirm this:

    The following disk device appears to contain a currently 
    unmounted file system.
    list of enclosure names
     
    Are you sure you want to destroy these file systems 
    [y,n,q,?] (default: n) y
    

    vxdiskadm asks you to confirm that the devices are to be reinitialized before proceeding:

    Reinitialize these devices? [y,n,q,?] (default: n) y
    VxVM INFO V-5-2-205 Initializing device device name.
  13. You can now choose whether the disk is to be formatted as a CDS disk that is portable between different operating systems, or as a non-portable aixdisk-format disk:

      Enter the desired format [cdsdisk,aixdisk,q,?]
    (default: cdsdisk)

    Enter the format that is appropriate for your needs. In most cases, this is the default format, cdsdisk.

  14. At the following prompt, vxdiskadm asks if you want to use the default private region size of 65536 blocks (32MB). Press Return to confirm that you want to use the default value, or enter a different value. (The maximum value that you can specify is 524288 blocks.)

    Enter desired private region length [<privlen>,q,?]
    (default: 65536)

    vxdiskadm then proceeds to add the disks.

    VxVM INFO V-5-2-88 Adding disk device device name to disk group
    disk group name with disk name disk name.
     .
     .
     .
  15. If you choose not to use the default disk names, vxdiskadm prompts you to enter the disk name.

  16. At the following prompt, indicate whether you want to continue to initialize more disks (y) or return to the vxdiskadm main menu (n):

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

The default layout for disks can be changed.

More Information

Disabling multipathing and making devices invisible to VxVM

Displaying or changing default disk layout attributes