Red Hat ENTERPRISE LINUX 5.1 - LVM ADMINISTRATION Manual page 52

Table of Contents

Advertisement

Chapter 4. LVM Administration with CLI Commands
/dev/sdc1
IdwM-01S9-XO8M-mcpsVe
/dev/sdd1
dECm-0RZ3-0dGW-tUqkCS
• The --noheadings argument suppresses the headings line. This can be useful for writing scripts.
The following example uses the --noheadings argument in combination with the pv_name
argument, which will generate a list of all physical volumes.
# pvs --noheadings -o pv_name
/dev/sdb1
/dev/sdc1
/dev/sdd1
• The --separator separator argument uses separator to separate each field. This can be
useful in a script if you are running a grep command on the output.
The following example separates the default output fields of the pvs command with an equals sign
(=).
# pvs --separator =
PV=VG=Fmt=Attr=PSize=PFree
/dev/sdb1=new_vg=lvm2=a-=17.14G=17.14G
/dev/sdc1=new_vg=lvm2=a-=17.14G=17.09G
/dev/sdd1=new_vg=lvm2=a-=17.14G=17.14G
To keep the fields aligned when using the separator argument, use the separator argument in
conjunction with the --aligned argument.
# pvs --separator = --aligned
PV
=VG
/dev/sdb1 =new_vg=lvm2=a-
/dev/sdc1 =new_vg=lvm2=a-
/dev/sdd1 =new_vg=lvm2=a-
You can use the -P argument of the lvs or vgs command to display information about a failed
volume that would otherwise not appear in the output. For information on the output this argument
Section 6.2, "Displaying Information on Failed
yields, see
For a full listing of display arguments, see the pvs(8), vgs(8) and lvs(8) man pages.
Volume group fields can be mixed with either physical volume (and physical volume segment) fields or
with logical volume (and logical volume segment) fields, but physical volume and logical volume fields
cannot be mixed. For example, the following command will display one line of output for each physical
volume.
40
new_vg lvm2 a-
new_vg lvm2 a-
=Fmt =Attr=PSize =PFree
=17.14G=17.14G
=17.14G=17.09G
=17.14G=17.14G
17.14G 17.09G
17.14G Joqlch-yWSj-kuEn-
17.14G 17.14G
17.14G yvfvZK-Cf31-j75k-
Devices".

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 5.1 cluster logical volume manager

Table of Contents