Format Control - Red Hat ENTERPRISE LINUX 4 - LVM ADMINISTRATOR Manual

Cluster logical volume manager
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
VG
/dev/sdb1
new_vg lvm2 a-
/dev/sdc1
new_vg lvm2 a-
/dev/sdd1
new_vg lvm2 a-
The following command displays only the physical volume name and size.
# pvs -o pv_name,pv_size
PV
PSize
/dev/sdb1
17.14G
/dev/sdc1
17.14G
/dev/sdd1
17.14G
• 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
VG
/dev/sdb1
new_vg lvm2 a-
M7iv-6XqA-dqGeXY
/dev/sdc1
new_vg lvm2 a-
XO8M-mcpsVe
/dev/sdd1
new_vg lvm2 a-
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
VG
/dev/sdb1
new_vg lvm2 a-
D9eB-M7iv-6XqA-dqGeXY
Fmt
Attr PSize
17.14G 17.14G
17.14G 17.09G
17.14G 17.14G
Fmt
Attr PSize
17.14G 17.14G onFF2w-1fLC-ughJ-D9eB-
17.14G 17.09G Joqlch-yWSj-kuEn-IdwM-01S9-
17.14G 17.14G yvfvZK-Cf31-j75k-
Fmt
Attr PSize
17.14G 17.14G
PFree
PFree
PV UUID
PFree
DevSize PV UUID
17.14G onFF2w-1fLC-ughJ-
Format Control
41

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Enterprise linux 4

Table of Contents