Symantec logo

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. For example, some may be initialized, while others may be encapsulated.


  Caution   Initialization does not preserve data on disks.


When initializing or encapsulating multiple disks at one time, it is possible to exclude certain disks or certain controllers. To exclude disks, list the names of the disks to be excluded in the file /etc/vx/disks.exclude before the initialization or encapsulation. You can exclude all disks on specific controllers from initialization or encapsulation by listing those controllers in the file /etc/vx/cntrls.exclude.

 To initialize disks for VxVM use

  1. Select menu item 1 (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):

    Add or initialize disks

    Menu: VolumeManager/Disk/AddDisks

    Use this operation to add one or more disks to a disk group.

    You can add the selected disks to an existing disk group or to

    a new disk group that will be created as a part of the

    operation. The selected disks may also be added to a disk group

    as spares. The selected disks may also be

    initialized without adding them to a disk group leaving the

    disks available for use as replacement disks.

    More than one disk or pattern may be entered at the prompt.

    Here are some disk selection examples:

all: all disks

c3 c4t2: all disks on both controller 3 and controller

4,target 2

c3t4d2: a single disk (in the c#t#d# naming scheme)

xyz_0 : a single disk (in the enclosure based naming

scheme)

xyz_ : all disks on the enclosure whose name is xyz

Select disk devices to add:

[<pattern-list>,all,list,q,?]

<pattern-list> can be a single disk, or a series of disks and/or controllers (with optional targets). If <pattern-list> consists of multiple items, separate them using white space, for example:

c3t0d0 c3t1d0 c3t2d0 c3t3d0

specifies fours disks at separate target IDs on controller 3.

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

DEVICE DISK GROUP STATUS

c0t0d0 mydg01 mydg online

c0t1d0 mydg02 mydg online

c0t2d0 mydg03 mydg online

c0t3d0 - - online

c1t0d0 mydg10 mydg online

c1t0d1 - - online invalid

.

.

.

c3t0d0 - - online invalid

sena0_0 mydg33 mydg online

sena0_1 mydg34 mydg online

sena0_2 mydg35 mydg online

Select disk devices to add:

[<pattern-list>,all,list,q,?]

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.

  1. 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

  2. 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,?]

  3. 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.

  4. 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)

  5. 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

  6. 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

  7. 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.

  1. 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

  2. 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

  1. If you see the following prompt, it lists any disks that have already been initialized for use by VxVM; enter y to indicate that all of these disks should now be used:

    The following disk devices appear to have been initialized

    already.

    The disks are currently available as replacement disks.

    Output format: [Device]

    list of device names

    Use these devices? [Y,N,S(elect),q,?] (default: Y) Y

    Note that this prompt allows you to indicate "yes" or "no" for all of these disks (Y or N) or to select how to process each of these disks on an individual basis (S).

    If you are sure that you want to re-initialize all of these disks, enter Y at the following prompt:

    VxVM NOTICE V-5-2-366 The following disks you selected for use

    appear to already have been initialized for the Volume

    Manager. If you are certain the disks already have been

    initialized for the Volume Manager, then you do not need to

    reinitialize these disk devices.

    Output format: [Device]

    list of device names

    Are you sure you want to re-initialize these disks?

    [Y,N,S(elect),q,?] (default: N) Y

  2. vxdiskadm may now indicate that one or more disks is a candidate for encapsulation. Encapsulation allows you to add an active disk to VxVM control and preserve the data on that disk. If you want to preserve the data on the disk, enter y. If you are sure that there is no data on the disk that you want to preserve, enter n to avoid encapsulation.

    VxVM NOTICE V-5-2-355 The following disk device has a valid

    VTOC, but does not appear to have been initialized for the

    Volume 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.

    Output format: [Device]

    device name

    Encapsulate this device? [y,n,q,?] (default: y)

  3. If you choose to encapsulate the disk:

    vxdiskadm confirms its device name and prompts you for permission to proceed. Enter y (or press Return) to continue encapsulation:

    VxVM NOTICE V-5-2-311 The following disk device has been
    selected for encapsulation.

    Output format: [Device]

    device name

    Continue with encapsulation? [y,n,q,?] (default: y) y

    vxdiskadm now displays an encapsulation status, and informs you that you must perform a shutdown and reboot as soon as possible:

The disk device device name will be encapsulated and added

to the disk group dgname with the disk name disk name.

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 sliced disk:

Enter the desired format [cdsdisk,sliced,q,?]

(default:cdsdisk)

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

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)

If you entered cdsdisk as the format, you are prompted for the action to be taken if the disk cannot be converted this format:

Do you want to use 'sliced' as the format should 'cdsdisk'

fail? [y,n,q,?] (default: y)

If you enter y, and it is not possible to encapsulate the disk as a CDS disk, it is encapsulated as a sliced disk. Otherwise, the encapsulation fails.

vxdiskadm then proceeds to encapsulate the disks.

VxVM INFO V-5-2-340 The first stage of encapsulation has

completed successfully. You should now reboot your system at

the earliest possible opportunity.

The encapsulation will require two or three reboots which will
happen automatically after the next reboot. To reboot execute
the command:

shutdown -g0 -y -i6

This will update the /etc/vfstab file so that volume devices

are used to mount the file systems on this disk device. You

will need to update any other references such as backup

scripts, databases, or manually created swap devices.

See Displaying and changing default disk layout attributes for details of how to change the default layout that is used to initialize or encapsulate disks.