Symantec logo

Converting unused LVM physical volumes to VxVM disks

LVM disks or disk partitions that are not part of any volume group, and which contain no user data, can be converted by removing the LVM disk headers.

Warning: Make sure that the disks to be converted are not in use in any LVM configuration. Any user data on these disks is destroyed during conversion.

 To convert unused LVM physical volumes to VxVM disks

  1. Use the pvscan command to make sure that the disk is not part of any volume group as shown in this example:

    # pvscan

    pvscan -- reading all physical volumes (this may take a

    while...)

    pvscan -- inactive PV "/dev/sde1" is in no VG [8.48 GB]

    pvscan -- ACTIVE PV "/dev/sdf" of VG "vg02" [8.47 GB / 8.47

    GB free]

    pvscan -- inactive PV "/dev/sdg" is in no VG [8.48 GB]

    pvscan -- ACTIVE PV "/dev/sdh1" of VG "vg02" [8.47 GB / 8.47

    GB free]

    pvscan -- total: 4 [33.92 GB] / in use: 2 [16.96 GB] / in no

    VG: 2 [16.96 GB]

    This shows that the disk devices sdf and sdh1 are associated with volume group, vg02, but sde1 and sdg are not in any volume group.

  2. Use the following commands to remove LVM header information from each disk:

    # dd if=/dev/zero of=/dev/diskdev bs=1k count=3

    # blockdev --rereadpt /dev/diskdev

    Warning: When running dd on a disk partition, make sure that you specify the device for the disk partition rather than the disk name. Otherwise, you will overwrite information for other partitions on the disk.
  3. After overwriting the LVM header, use the fdisk or sfdisk command to edit the partition table on the disk:

    # fdisk -l /dev/diskdev

    If the LVM disk was created on an entire disk, relabel it as a DOS or SUN partition. If the LVM disk was created on a disk partition, change the partition type from "Linux LVM" to "Linux".

  4. After writing the partition table to the disk, a disk or disk partition (where there is no other useful partition on the disk) may by initialized as a VM disk by running the vxdiskadm command and selecting item 1 Add or initialize one or more disks, or by using the VEA GUI. For a disk partition that coexists with other partitions on a disk, initialize the partition as a simple disk.

    See "Disks under VxVM control" on page 92.