Encapsulation : We usually need encapsulation of root disk because we have to keep existing data. It is used at the time of root mirroring
Initialization: When we add a disk we need initialized to make it under VxVM Control. During initialization all data will be destroyed. We never initialized root disk during mirroring.
Encapsulating a disk
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.
Caution: Encapsulating a disk requires that the system be rebooted several times. Schedule performance of this procedure for a time when this does not inconvenience users.
To prevent the encapsulation failing, make sure that:
The disk has two free partitions for the public and private regions.
The disk has an s2 slice.
The disk has a small amount of free space (at least 1 megabyte at the beginning or end of the disk) that does not belong to any partition. If the disk being encapsulated is the root disk, and this does not have sufficient free space available, a similar sized portion of the swap partition is used instead.
Note: Only encapsulate a root disk if you also intend to mirror it. There is no benefit in root-disk encapsulation for its own sake.
Use the format or fdisk commands to obtain a printout of the root disk partition table before you encapsulate a root disk. For more information, see the appropriate manual pages. You may need this information should yousubsequently need to recreate the original root disk.
You cannot grow or shrink any volume (rootvol, usrvol, varvol, optvol, swapvol, and so on) that is associated with an encapsulated root disk. This is because these volumes map to physical partitions on the disk, and these partitions must be contiguous.
Caution: If the root disk is encapsulated and the dump device is covered by the swap volume, it is not safe to use the savecore-L operation because this overwrites the swap area. Configure a dedicated dump device on a partition other than the swap area.
To encapsulate a disk for use in VxVM
Select menu item 2 (Encapsulate one or more disks) from the vxdiskadm main menu.
Note: 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:
Encapsulate one or more disks
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:
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 encapsulate:
[<pattern-list>,all,list,q,?] device name
Where <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, 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.
2 To continue the operation, enter y (or press Return) at the following prompt:
Here is the disk selected. Output format: [Device]
device name
Continue operation? [y,n,q,?] (default: y) y
3 To add the disk to a disk group, enter the name of the disk group (this disk group need not already exist):
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 group name that does not yet exist.
Which disk group [<group>,list,q,?]
4 At the following prompt, either press Return to accept the default disk name or enter a disk name:
Use a default disk name for the disk? [y,n,q,?] (default: y)
5 To continue with the operation, enter y (or press Return) at the following prompt:
The selected disks will be encapsulated and added to the dgname disk group with default disk names.
device name
Continue with operation? [y,n,q,?] (default: y) y
6 To confirm that encapsulation should proceed, enter y (or press Return) at the following prompt:
The following disk has been selected for encapsulation. Output format: [Device]
device name
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 diskgroup01.
7 For non-root disks, 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. Note that only the sliced format is suitable for use with root, boot or swap disks.
8 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)
9 If you entered 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' 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.
10 vxdiskadm then proceeds to encapsulate the disks.
VxVM NOTICE V-5-2-311 The device name disk has been configured for encapsulation.
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 whichwill happen automatically after the next reboot. To rebootexecute the command:
shutdown -g0 -y -i6
This will update the /etc/vfstab file so that volume devicesare used to mount the file systems on this disk device. Youwill need to update any other references such as backupscripts, databases, or manually created swap devices.
Note: The original /etc/vfstab file
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
No comments:
Post a Comment