This section describes how to encapsulate a disk for use in VxVM. Encapsulation preserves any existing data on the disk when the disk is placed under VxVM control.
A root disk can be encapsulated and brought under VxVM control. However, there are restrictions on the layout and configuration of root disks that can be encapsulated.
See "Rootability" on page 109.
See "Restrictions on using rootability with Linux" on page 109.
Disks with msdos
disk labels can be encapsulated as auto:sliced
disks provided that they have at least one spare primary partition that can be allocated to the public region, and one spare primary or logical partition that can be allocated to the private region.
Disks with sun
disk labels can be encapsulated as auto:sliced
disks provided that they have at least two spare slices that can be allocated to the public and private regions.
Extensible Firmware Interface (EFI) disks with gpt (GUID Partition Table) labels can be encapsulated as auto:sliced
disks provided that they have at least two spare slices that can be allocated to the public and private regions.
The entry in the partition table for the public region does not require any additional space on the disk. Instead it is used to represent (or encapsulate) the disk space that is used by the existing partitions.
Unlike the public region, the partition for the private region requires a small amount of space at the beginning or end of the disk that does not belong to any existing partition or slice. By default, the space required for the private region is 32MB, which is rounded up to the nearest whole number of cylinders. On most modern disks, one cylinder is usually sufficient.
To encapsulate a disk for use in VxVM
2 (Encapsulate one or more disks)
from the vxdiskadm
main menu.
Your system may use device names that differ from the examples shown here.
At the following prompt, enter the disk device name for the disks to be encapsulated:
Menu: VolumeManager/Disk/Encapsulate
Use this operation to convert one or more disks to use the
Volume Manager. This adds the disks to a disk group and
replaces existing partitions with volumes. Disk encapsulation
requires a reboot for the changes to take effect.
More than one disk or pattern may be entered at the prompt.
Here are some disk selection examples:
sdb hdc: add both disk sdb and hdc
xyz_0: a single disk (in the enclosure-based naming
xyz_: all disks on the enclosure whose name is xyz
Select disk devices to encapsulate:
[<pattern-list>,all,list,q,?] device name
Where <pattern-list> can be a single disk, or a series of disks. If <pattern-list> consists of multiple items, those items must be separated by white space.
If you do not know the address (device name) of the disk to be encapsulated, enter l
or list
at the prompt for a complete listing of available disks.
y
(or press Return) at the following prompt:
You can choose to add this disk to an existing disk group or to
a new disk group. To create a new disk group, select a disk
Use a default disk name for the disk? [y,n,q,?] (default: y)
y
(or press Return) at the following prompt:
The selected disks will be encapsulated and added to the
y
(or press Return) at the following prompt:
Continue with encapsulation? [y,n,q,?] (default: y) y
A message similar to the following confirms that the disk is being encapsulated for use in VxVM and tells you that a reboot is needed:
The disk device device name will be encapsulated and added to
the disk group diskgroup with the disk name mydg01.
Enter the desired format [cdsdisk,sliced,simple,q,?]
Enter the format that is appropriate for your needs. In most cases, this is the default format, cdsdisk
. However, only the sliced
format is suitable for use with root, boot or swap disks.
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.)
cdsdisk
as the format in step 7, 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'
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 NOTICE V-5-2-311 The device name disk has been configured
VxVM INFO V-5-2-340 The first stage of encapsulation has
The encapsulation will require two or three reboots which
will happen automatically after the next reboot. To reboot
This will update the /etc/fstab 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.
The original /etc/fstab
file is saved as /etc/fstab.prevm
.
At the following prompt, indicate whether you want to encapsulate more disks (y
) or return to the vxdiskadm
main menu (n
):
Encapsulate other disks? [y,n,q,?] (default: n) n
The default layout that is used to encapsulate disks can be changed.
See "Displaying or changing default disk layout attributes" on page 96.