Formatted disks being placed under Veritas Volume Manager (VxVM) control may be new or previously used outside VxVM.
The set of disks can consist of 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 disks may be initialized, while others may be encapsulated to preserve existing data on the disks.
When initializing multiple disks at one time, it is possible to exclude certain disks or certain controllers.
You can also exclude certain disks or certain controllers when encapsulating multiple disks at one time.
To exclude a device from the view of VxVM, select Prevent multipathing/Suppress devices from VxVM's view from the vxdiskadm main menu.
A disk cannot be initialized if it does not have a valid useable partition table. You can use the fdisk command to create an empty partition table on a disk as shown here:
# fdisk /dev/sdX Command (m for help): o Command (m for help): w
where /dev/sdX is the name of the disk device, for example, /dev/sdi.
Warning: |
The fdisk command can destroy data on the disk. Do not use this command if the disk contains data that you want to preserve. |
To initialize disks for VxVM use
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:
sde sdf sdg sdh
If you enter list at the prompt, the vxdiskadm program displays a list of the disks available to the system:
DEVICE DISK GROUP STATUS sdb mydg01 mydg online sdc mydg02 mydg online sdd mydg03 mydg online sde - - online sdf mydg04 mydg online sdg - - online invalid
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.
Here are the disks selected. Output format: [Device] list of device names Continue operation? [y,n,q,?] (default: y) y
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,?]
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: y)
If the new disk group may be moved between different operating system platforms, enter y. Otherwise, enter n.
Use default disk names for the disks? [y,n,q,?] (default: y) n
Add disks as spare disks for disk group name? [y,n,q,?] (default: n) n
Exclude disks from hot-relocation use? [y,n,q,?} (default: n) n
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.
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
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
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
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 reinitialize 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 Reinitialize these devices? [Y,N,S(elect),q,?] (default: Y) Y
VxVM NOTICE V-5-2-355 The following disk device has a valid partition table, 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)
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: VxVM INFO V-5-2-333 The disk device device name will be encapsulated and added to the disk group disk group name 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 or simple disk:
Enter the desired format [cdsdisk,sliced,simple,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 to 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. You should now reboot your system at the earliest possible opportunity, for example by running this command:
# shutdown -r now
The /etc/fstab file is updated to include the volume devices that are used to mount any encapsulated file systems. You may need to update any other references in backup scripts, databases, or manually created swap devices. The original /etc/fstab file is saved as /etc/fstab.b4vxvm.
Instead of encapsulating, initialize? [y,n,q,?] (default: n) yvxdiskadm now confirms those disks that are being initialized and added to VxVM control with messages similar to the following. In addition, you may be prompted to perform surface analysis.
VxVM INFO V-5-2-205 Initializing device device name.
Enter the desired format [cdsdisk,sliced,simple,q,?] (default: cdsdisk)
Enter the format that is appropriate for your needs. In most cases, this is the default format, cdsdisk.
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. . . .
Add or initialize other disks? [y,n,q,?] (default: n)
You can change the default layout for disks using the vxdisk command or the vxdiskadm utility.
See the vxdisk
(1M) manual page.
See the vxdiskadm
(1M) manual page.
More Information