Example: converting LVM volume groups to VxVM disk groups
To convert LVM volume groups to VxVM disk groups:
# vxvmconvert
Volume Manager Support Operations
Menu: VolumeManager/LVM_Conversion
1 Analyze LVM Volume Groups for Conversion
2 Convert LVM Volume Groups to VxVM
3 Roll back from VxVM to LVM
list List disk information
listvg List LVM Volume Group information
? Display help about menu
?? Display help about the menuing system
q Exit from menus
Select an operation to perform: 2
Convert one or more LVM Volume Groups
Menu: VolumeManager/LVM_Conversion/Convert_LVM_VGs
Use this operation to convert one or more LVM Volume Groups to one or more VxVM disk groups. This adds the disks to a disk group and replaces existing partitions with volumes. LVM-VxVM Volume Group conversion may require a reboot for the changes to take effect. For this release, only Non-root LVM Volume Groups are allowed to be converted.
More than one Volume Group or pattern may be entered at the prompt.
Here are some LVM Volume Group selection examples:
all: analyze all LVM Volume Groups (all except Root VG)
listvg: list all LVM Volume Groups
list: list all disk devices
vg_name: a single LVM Volume Group, named vg_name
<pattern>: for example vg08 vg09 vg05
Select Volume Groups to convert :
[<pattern-list>,all,list,listvg,q,?] listvg
LVM VOLUME GROUP INFORMATION
NAME TYPE PHYSICAL VOLUME
vg00 ROOT c4t6d0
vg05 Non-Root c4t5d0
vg03 Non-Root c4t3d0 c4t2d0
vg08 Non-Root c4t8d0
Select Volume Groups to convert :
[<pattern-list>,all,list,listvg,q,?] vg08
vg08
Convert this Volume Group? [y,n,q,?] (default: y)
Name a new disk group [<group>,list,q,?] (default: dg08)
The following disk has been found in the vg08 volume group and will be configured for conversion to a VxVM disk group.
c4t8d0
A new disk group dg08 will be created and the disk device c4t8d0 will be converted and added to the disk group with the disk name dg0801.
The c4t8d0 disk has been configured for conversion.
The first stage of the conversion operation has completed successfully. If you commit to the changes hereafter, the system will attempt to umount all of the associated file systems, stop and export each Volume Group, and then attempt to complete the conversion without having to reboot the system. If we are unable to stop and export any of the Volume Groups, then the conversion process will not be able to complete without a reboot.You would then be given the choice to either abort the conversion, or finish the conversion by rebooting the system.
The conversion process 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. If you do not like the default names chosen for the corresponding logical volumes, you may change these to whatever you like using vxedit.
Second Stage Conversion Analysis of vg08
Analysis of vg08 found sufficient Private Space for conversion
Conversion Analysis of c4t8d0 indicates that the Volume Group is still in use, which may prevent the completion of the conversion without having to robot the system. You may want to double check that none of the volumes in the volume group are in use before continuing with the conversion.
Hit RETURN to continue.
Are you ready to commit to these changes? [y,n,q,?] (default: y)
Saving LVM configuration records for Volume Group vg08
Volume Group configuration for /dev/vg08 has been saved in /etc/vx/reconfig.d/vgrecords/vg08/vg08.backup
Beginning the export process on Volume Group "/dev/vg08".
Volume group "/dev/vg08" is still active.
/dev/dsk/c4t8d0
/dev/vg08/lv1 will convert to /dev/vx/dsk/dg08/dg08lv1
/dev/vg08/rlv1 will convert to /dev/vx/rdsk/dg08/dg08lv1
/dev/vg08/lv2 will convert to /dev/vx/dsk/dg08/dg08lv2
/dev/vg08/rlv2 will convert to /dev/vx/rdsk/vg08dg/dg08lv2
LVM Volume Group vg08 Records Saved
Unmounting vg08 file systems
Volume group "/dev/vg08" has been successfully changed.
The Volume Manager is now reconfiguring (partition phase)...
Volume Manager: Initializing c4t8d0 as a converted LVM disk.
The system reconfiguration will now be done without rebooting.
The Volume Manager is now reconfiguring (initialization phase)...
Volume Manager: Adding dg0801 (c4t8d0) as a converted LVM disk.
Adding volumes for c4t8d0...
Starting new volumes...
Updating /etc/fstab...
The system will now Convert the LVM Volume Groups over to VxVM disk groups.
Convert other LVM Volume Groups? [y,n,q,?] (default: n)
Example of a failed conversion
# vxvmconvert
Volume Manager Support Operations
Menu: VolumeManager/LVM_Conversion
1 Analyze LVM Volume Groups for Conversion
2 Convert LVM Volume Groups to VxVM
3 Roll back from VxVM to LVM
list List disk information
listvg List LVM Volume Group information
? Display help about menu
?? Display help about the menuing system
q Exit from menus
Select an operation to perform: 2
Convert one or more LVM Volume Groups
Menu: VolumeManager/LVM_Conversion/Convert_LVM_VGs
Use this operation to convert one or more LVM Volume Groups to one or more VxVM disk groups. This adds the disks to a disk group and replaces existing partitions with volumes. LVM-VxVM Volume Group conversion may require a reboot for the changes to take effect. For this release, only Non-root LVM Volume Groups are allowed to be converted.
More than one Volume Group or pattern may be entered at the prompt.
Here are some LVM Volume Group selection examples:
all: analyze all LVM Volume Groups (all except Root VG)
listvg: list all LVM Volume Groups
list: list all disk devices
vg_name: a single LVM Volume Group, named vg_name
<pattern>: for example vg08 vg09 vg05
Select Volume Groups to convert :
[<pattern-list>,all,list,listvg,q,?] listvg
LVM VOLUME GROUP INFORMATION
NAME TYPE PHYSICAL VOLUME
vg00 ROOT c4t6d0
vg05 Non-Root c4t5d0
vg03 Non-Root c4t3d0 c4t2d0
vg08 Non-Root c4t8d0
Select Volume Groups to convert :
[<pattern-list>,all,list,listvg,q,?] vg08
vg08
Convert this Volume Group? [y,n,q,?] (default: y)
Name a new disk group [<group>,list,q,?] (default: dg08)
The following disk has been found in the vg08 volume group and will be configured for conversion to a VxVM disk group.
c4t8d0
A new disk group dg08 will be created and the disk device c4t8d0 will be converted and added to the disk group with the disk name dg0801.
The c4t8d0 disk has been configured for conversion.
The first stage of the conversion operation has completed successfully. If you commit to the changes hereafter, the system will attempt to unmount all of the associated file systems, stop and export each Volume Group, and then attempt to complete the conversion without having to reboot the system. If we are unable to stop and export any of the Volume Groups, then the conversion process will not be able to complete without a reboot. You would then be given the choice to either abort the conversion, or finish the conversion by rebooting the system.
The conversion process 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. If you do not like the default names chosen for the corresponding logical volumes, you may change these to whatever you like using vxedit.
Second Stage Conversion Analysis of vg08
Analysis of vg08 found insufficient Private Space for conversion
SMALLEST VGRA space = 176
RESERVED space sectors = 78
PRIVATE SPACE/FREE sectors = 98
AVAILABLE sector space = 49
AVAILABLE sector bytes = 50176
RECORDS neededs to convert = 399
MAXIMUM records allowable = 392
The smallest disk in the Volume Group (vg08) does not have sufficient private space for the conversion to succeed. There is only enough private space for 392 VM Database records and the conversion of Volume Group (vg08) would require enough space to allow 399 VxVM Database records. This would roughly translate to needing an additional 896 bytes available in the private space. This can be accomplished by reducing the number of volumes in the (vg08) Volume Group, and allowing that for every volume removed, the number of Database records required would be reduced by three. This is only a rough approximation, however.
Hit RETURN to continue.
Example: list, listvg, and vxprint outputs of an LVM volume group before and after conversion
The examples given below, shows the vxvmconvert listvg, list, and vxprint output for an LVM volume group vg08 converted to a VxVM disk group dg08.
Example of vxvmconvert listvg output before conversion of volume group vg08
LVM VOLUME GROUP INFORMATION
NAME TYPE PHYSICAL VOLUME
vg00 ROOT c0t5d0
vg08 Non-Root c0t8d0
vg09 Non-Root c0t9d0
Example of the vxvmconvert list output which shows the disk devices on a system
DEVICE DISK GROUP STATUS
c0t5d0 - - online
c0t8d0 - - LVM
c0t9d0 - - LVM
c0t10d0 disk01 rootdg online
c0t11d0 - - online
Disk group: rootdg
What does vxmvconvert list display?
The device indicates a physical disk, a disk with a name indicates if the disk is under VxVM control, a group shows the disk group name, and the status indicates if it is an LVM disk. If the status is online, that means VxVM acknowledges the disk but doesn't have it under its control.
Example of the vxprint output before conversion
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
dg rootdg rootdg - - - - - -
dm disk01 c0t10d0 - 2079468 - - - -
The list and listvg output is from within the vxvmconvert command. vxprint is a command line command.
Example of the listvg output after conversion of vg08
LVM VOLUME GROUP INFORMATION
Name Type Physical Volumes
vg00 ROOT c0t5d0
vg09 Non-Root c0t9d0
Volume Group to list in detail: None
Note
Note that vg08 is no longer listed under LVM information.
Example of the vxvmconvert listvg output after conversion of volume group vg08 to dg08
DEVICE DISK GROUP STATUS
c0t5d0 - - online invalid
c0t8d0 dg0801 dg08 online
c0t9d0 - LVM
c0t10d0 disk01 rootdg online
c0t11d0 - - online
Disk group: rootdg
Example of the vxprint output after conversion
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTILO PUTIL0
dg dg08 dg08 - - - - - -
dm dg0801 c0t8d0 - 2080768 - - - -
v dg08lv1 fsgen ENABLED 102400 - ACTIVE - -
pl dg08lv1-01 dg08lv1 ENABLED 102400 - ACTIVE - -
sd dg0801-01 dg08lv1-01 ENABLED 102400 - - - -
vxprint Explained
The vxprint list given above provides the following information:
- The disk group dg08 contains the VxVM disk dg0801 and the volume dg08lv1. The VxVM disk dg0801 is associated with disk device c0t8d0 and is 2080768 blocks in length. The volume dg08lv1 is of type fsgen, is enabled in the VxVM kernel driver, is of length 102400, and is in the ACTIVE state. This means that the volume is started, and the plex is enabled. Operations to the volume such as recovery and data access will be governed by the usage type fsgen.
- The plex dg08lv1-01 is associated with volume dg08lv1, and maps the entire address range of the volume. Associated with the plex is one subdisk, dg0801-01 which maps the plex address range from 0 to the entire length of the plex, i.e. 102400 blocks. As implied by the root of its name, the subdisk dg0801-01 uses an extent from the VxVM disk dg0801.
|