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.
| 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 |
|
|
| 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 |
|
| 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:
- Using this procedure to copy to an existing logical volume will overwrite any data on that volume without requesting user confirmation.
- 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:
- 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.
- You cannot change the name of, import, or export rootvg.
- You must have enough direct access storage to duplicate a specific logical volume.