LVM command-line interface: LVM has a number of low-level
user commands to perform LVM tasks, described in “Physical Volume Management Commands”, “Volume Group Management Commands”, and “Logical Volume Management Commands”.
The following tables provide an overview of which commands
perform a given task. For more information, see the HP-UX
Reference.
Table 3-1 Physical Volume Management Commands
Task | Command |
---|
Changing the characteristics
of a physical volume in a volume group | pvchange |
Creating a physical volume
for use in a volume group | pvcreate |
Displaying information about
physical volumes in a volume group | pvdisplay |
Moving data from one physical
volume to another | pvmove |
Removing a physical
volume from LVM control | pvremove |
Checking or repairing a physical volume | pvck* |
Checking if a disk volume is under LVM
control | lvmchk |
Table 3-2 Volume Group Management Commands
Task | Command |
---|
Creating a volume group | vgcreate |
Removing a volume group | vgremove |
Activating, deactivating, or changing the characteristics
of a volume group | vgchange |
Modifying the configuration
parameters of a volume group; handling physical volume size changes | vgmodify* |
Backing up volume group configuration
information | vgcfgbackup |
Restoring volume group configuration
from a configuration file | vgcfgrestore |
Displaying information about
volume groups | vgdisplay |
Exporting a volume group
and its associated logical volumes | vgexport |
Importing a volume group
onto the system; adding an existing volume group back into the LVM
configuration files | vgimport |
Scanning all physical volumes
for logical volumes and volume groups; recovering the LVM configuration
files | vgscan |
Adding a disk to a volume
group | vgextend |
Removing a disk
from a volume group | vgreduce |
Synchronizing mirrored logical volumes
in a volume group | vgsync |
Modifying the volume group ID on a physical
volume | vgchgid |
Migrating a volume group from legacy
to persistent device files | vgdsf |
Displaying limits associated with a volume group
version | lvmadm |
Table 3-3 Logical Volume Management Commands
Task | Command |
---|
Creating a logical volume | lvcreate |
Modifying a logical volume | lvchange |
Displaying information about
logical volumes | lvdisplay |
Increasing the size of a
logical volume by allocating disk space | lvextend |
Decreasing the size of a
logical volume | lvreduce |
Removing the allocation of
disk space for one or more logical volumes within a volume group | lvremove |
Preparing a logical volume
to be a root, primary swap, or dump volume; updating the boot information
on the boot physical volume | lvlnboot * |
Removing the link that makes
a logical volume a root, primary swap, or dump volume | lvrmboot* |
Splitting a mirrored logical
volume into two logical volumes | lvsplit |
Merging two logical volumes into one
mirrored logical volume | lvmerge |
Synchronizing
mirror copies in a mirrored logical volume | lvsync |
*The
pvck,
vgmodify,
lvlnboot, and
lvrmboot commands are not supported on Version 2.x volume groups.
The command-line interface is more powerful—and
thus more dangerous—than HP SMH and offers options that are
not available using HP SMH. For example, the following tasks cannot
currently be done by HP SMH. For these tasks, use the HP-UX commands: