Chapter 4. LVM Administration with CLI Commands
40
/dev/sdc1 new_vg lvm2 a- 17.14G 17.09G 17.14G Joqlch-yWSj-kuEn-
IdwM-01S9-XO8M-mcpsVe
/dev/sdd1 new_vg lvm2 a- 17.14G 17.14G 17.14G yvfvZK-Cf31-j75k-
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 =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
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
yields, see
Section 6.2, “Displaying Information on Failed Devices”
.
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.
Содержание CLUSTER SUITE 4.7 - CLUSTER LVM ADMINISTRATORS
Страница 1: ...Red Hat Cluster Suite 4 7 Cluster Logical Volume Manager LVM Administrator s Guide ...
Страница 6: ...vi ...
Страница 12: ...xii ...
Страница 24: ...12 ...
Страница 62: ...50 ...
Страница 72: ...60 ...
Страница 82: ...70 ...
Страница 84: ...72 ...
Страница 86: ...74 ...
Страница 96: ...84 ...
Страница 103: ...91 Appendix E Revision History Revision History Revision 1 0 ...
Страница 104: ...92 ...
Страница 108: ...96 ...