LVM maintenance commands and fastpaths

The simplest tasks you might need when maintaining the entities that LVM controls (physical and logical volumes, volume groups, and file systems) are grouped within the following table.

Table 1. Managing Logical Volumes and Storage Tasks
Task SMIT Fast Path Command or File
Activate a volume group smit varyonvg  
Add a fixed disk without data to existing volume group smit extendvg  
Add a fixed disk without data to new volume group smit mkvg  
Add a logical volumeNote 1 smit mklv  
Add a volume group smit mkvg  
Add and activate a new volume group smit mkvg  
Change a logical volume to use data allocation smit chlv1  
Change the name of a volume groupNote 2
  1. smit varyoffvg
  2. smit exportvg
  3. smit importvg
  4. smit mountfs
  1. varyoffvg OldVGName
  2. exportvg OldVGName
  3. importvg NewVGName
  4. mount all
Change a volume group to use automatic activation smit chvg   
Change or set logical volume policies smit chlv1  
Copy a logical volume to a new logical volumeNote 3 smit cplv  
Copy a logical volume to an existing logical volume of the same sizeAttn 1 smit cplv  
Copy a logical volume to an existing logical volume of smaller sizeAttn 1 Note 3 Do not use SMITAttn 2
  1. Create logical volume. For example: mklv -y hdiskN vg00 4
  2. Create new file system on new logical volume. For example: crfs -v jfs -d hdiskN -m /doc -A yes
  3. Mount file system. For example: mount /doc
  4. Create directory at new mount point. For example: mkdir /doc/options
  5. Transfer files system from source to destination logical volume. For example: cp -R /usr/adam/oldoptions/* \ /doc/options
Copy a logical volume to an existing logical volume of larger sizeAttn 1 smit cplv  
Deactivate a volume group smit varyoffvg  
Enable write-verify and change scheduling policy smit chlv1  
Increase the maximum size of a logical volume smit chlv1  
Increase the size of a logical volume smit extendlv  
List all logical volumes by volume group smit lslv2  
List all physical volumes in system smit lspv2  
List all volume groups smit lsvg2  
List the status, logical volumes, or partitions of a physical volume smit lspv  
List the contents of a volume group smit lsvg1  
List a logical volume's status or mapping smit lslv  
Mirror a logical volume with or without data allocation smit mklvcopy  
Power off a removable disk smit offdsk Available with the hot-removability feature only
Power on a removable disk smit ondsk Available with the hot-removability feature only
Remove mirroring from a volume group smit unmirrorvg  
Remove a volume group smit reducevg2  
Reorganize a volume group smit reorgvg  
Unconfigure and power off a disk smit rmvdsk1 or smit rmvdsk then smit opendoor  
Attention:
  1. Using this procedure to copy to an existing logical volume will overwrite any data on that volume without requesting user confirmation.
  2. Do not use the SMIT procedure or the cplv command to copy a larger logical volume to a smaller one. Doing so results in a corrupted file system because some of the data (including the superblock) is not copied to the smaller logical volume.
Note:
  1. After you create a logical volume, the state will be closed because no LVM structure is using that logical volume. It will remain closed until a file system has been mounted over the logical volume or the logical volume is opened for raw I/O.
  2. You cannot change the name of, import, or export rootvg.
  3. You must have enough direct access storage to duplicate a specific logical volume.