Format Control - Red Hat ENTERPRISE LINUX 5.1 - LVM ADMINISTRATION Manual

Table of Contents

Advertisement

• Instructions for specifying the units of the report output.

4.9.1. Format Control

Whether you use the pvs, lvs, or vgs command determines the default set of fields displayed and
the sort order. You can control the output of these commands with the following arguments:
• You can change what fields are displayed to something other than the default by using the -o
argument. For example, the following output is the default display for the pvs command (which
displays information about physcial volumes).
# pvs
PV
/dev/sdb1
/dev/sdc1
/dev/sdd1
The following command displays only the physical volume name and size.
# pvs -o pv_name,pv_size
PV
/dev/sdb1
/dev/sdc1
/dev/sdd1
• You can append a field to the output with the plus sign (+), which is used in combination with the -o
argument.
The following example displays the UUID of the physical volume in addition to the default fields.
# pvs -o +pv_uuid
PV
/dev/sdb1
M7iv-6XqA-dqGeXY
/dev/sdc1
XO8M-mcpsVe
/dev/sdd1
dECm-0RZ3-0dGW-tUqkCS
• Adding the -v argument to a command includes some extra fields. For example, the pvs -v
command will display the DevSize and PV UUID fields in addition to the default fields.
# pvs -v
Scanning for physical volume names
PV
/dev/sdb1
D9eB-M7iv-6XqA-dqGeXY
VG
Fmt
Attr PSize
new_vg lvm2 a-
new_vg lvm2 a-
new_vg lvm2 a-
PSize
17.14G
17.14G
17.14G
VG
Fmt
Attr PSize
new_vg lvm2 a-
new_vg lvm2 a-
new_vg lvm2 a-
VG
Fmt
Attr PSize
new_vg lvm2 a-
PFree
17.14G 17.14G
17.14G 17.09G
17.14G 17.14G
PFree
PV UUID
17.14G 17.14G onFF2w-1fLC-ughJ-D9eB-
17.14G 17.09G Joqlch-yWSj-kuEn-IdwM-01S9-
17.14G 17.14G yvfvZK-Cf31-j75k-
PFree
DevSize PV UUID
17.14G 17.14G
17.14G onFF2w-1fLC-ughJ-
Format Control
39

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 5.1 - LVM ADMINISTRATION and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Enterprise linux 5.1 cluster logical volume manager

Table of Contents