Chapter 4. LVM Administration with CLI Commands
You can scan for block devices that may be used as physical volumes with the
command, as shown in the following example.
# lvmdiskscan
/dev/ram0
/dev/sda
/dev/root
/dev/ram
/dev/sda1
/dev/VolGroup00/LogVol01
/dev/ram2
/dev/new_vg/lvol0
/dev/ram3
/dev/pkl_new_vg/sparkie_lv
/dev/ram4
/dev/ram5
/dev/ram6
/dev/ram7
/dev/ram8
/dev/ram9
/dev/ram10
/dev/ram11
/dev/ram12
/dev/ram13
/dev/ram14
/dev/ram15
/dev/sdb
/dev/sdb1
/dev/sdc
/dev/sdc1
/dev/sdd
/dev/sdd1
7 disks
17 partitions
0 LVM physical volume whole disks
4 LVM physical volumes
2.2. Displaying Physical Volumes
There are three commands you can use to display properties of LVM physical volumes:
, and
pvdisplay
pvscan
The
command provides physical volume information in a configurable form, displaying one
pvs
line per physical volume. The
useful for scripting. For information on using the
Section 9, "Customized Reporting for
The
command provides a verbose multi-line output for each physical volume. It
pvdisplay
displays physical properties (size, extents, volume group, etc.) in a fixed format.
The following example shows the output of the
24
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
.
command provides a great deal of format control, and is
pvs
LVM".
16.00 MB]
17.15 GB]
13.69 GB]
16.00 MB]
17.14 GB] LVM physical volume
512.00 MB]
16.00 MB]
52.00 MB]
16.00 MB]
7.14 GB]
16.00 MB]
16.00 MB]
16.00 MB]
16.00 MB]
16.00 MB]
16.00 MB]
16.00 MB]
16.00 MB]
16.00 MB]
16.00 MB]
16.00 MB]
16.00 MB]
17.15 GB]
17.14 GB] LVM physical volume
17.15 GB]
17.14 GB] LVM physical volume
17.15 GB]
17.14 GB] LVM physical volume
command to customize your output, see
pvs
command for a single physical
pvdisplay
lvmdiskscan
,
pvs