Chapter 5. LVM Administration with CLI Commands
clvmddaemon. For information, see Section 4.1, “Creating LVM Volumes in a Cluster”.
5.1. Using CLI Commands
--unitsargument in a command, lower-case indicates that units are in multiples of 1024 while upper-case indicates that units are in multiples of 1000.
lvol0in a volume group called
vg0can be specified as
vg0/lvol0. Where a list of volume groups is required but is left empty, a list of all volume groups will be substituted. Where a list of logical volumes is required but a volume group is given, a list of all the logical volumes in that volume group will be substituted. For example, the
lvdisplay vg0command will display all the logical volumes in volume group
-vargument, which can be entered multiple times to increase the output verbosity. For example, the following examples shows the default output of the
lvcreate -L 50MB new_vgRounding up size to full physical extent 52.00 MB Logical volume "lvol0" created
lvcreatecommand with the
lvcreate -v -L 50MB new_vgFinding volume group "new_vg" Rounding up size to full physical extent 52.00 MB Archiving volume group "new_vg" metadata (seqno 4). Creating logical volume lvol0 Creating volume group backup "/etc/lvm/backup/new_vg" (seqno 5). Found volume group "new_vg" Creating new_vg-lvol0 Loading new_vg-lvol0 table Resuming new_vg-lvol0 (253:2) Clearing start of logical volume "lvol0" Creating volume group backup "/etc/lvm/backup/new_vg" (seqno 5). Logical volume "lvol0" created
-vvvvargument to display increasingly more details about the command execution. The
-vvvvargument provides the maximum amount of information at this time. The following example shows only the first few lines of output for the
lvcreatecommand with the
lvcreate -vvvv -L 50MB new_vg#lvmcmdline.c:913 Processing: lvcreate -vvvv -L 50MB new_vg #lvmcmdline.c:916 O_DIRECT will be used #config/config.c:864 Setting global/locking_type to 1 #locking/locking.c:138 File-based locking selected. #config/config.c:841 Setting global/locking_dir to /var/lock/lvm #activate/activate.c:358 Getting target version for linear #ioctl/libdm-iface.c:1569 dm version OF  #ioctl/libdm-iface.c:1569 dm versions OF  #activate/activate.c:358 Getting target version for striped #ioctl/libdm-iface.c:1569 dm versions OF  #config/config.c:864 Setting activation/mirror_region_size to 512 ...
--helpargument of the command.
man lvmcommand provides general online information about LVM.
/dev/sdfwhich is part of a volume group and, when you plug it back in, you find that it is now
/dev/sdk. LVM will still find the physical volume because it identifies the physical volume by its UUID and not its device name. For information on specifying the UUID of a physical volume when creating a physical volume, see Section 7.4, “Recovering Physical Volume Metadata”.