Specifying Units - Red Hat ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION Manual

Hide thumbs Also See for ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION:
Table of Contents

Advertisement

# pvs -o pv_name,pv_size,pv_free
PV
PSize
/dev/sdb1
17.14G 17.14G
/dev/sdc1
17.14G 17.09G
/dev/sdd1
17.14G 17.14G
The following example shows the same output, sorted by the free space field.
# pvs -o pv_name,pv_size,pv_free -O pv_free
PV
PSize
/dev/sdc1
17.14G 17.09G
/dev/sdd1
17.14G 17.14G
/dev/sdb1
17.14G 17.14G
The following example shows that you do not need to display the field on which you are sorting.
# pvs -o pv_name,pv_size -O pv_free
PV
PSize
/dev/sdc1
17.14G
/dev/sdd1
17.14G
/dev/sdb1
17.14G
To display a reverse sort, precede a field you specify after the -O argument with the - character.
# pvs -o pv_name,pv_size,pv_free -O -pv_free
PV
PSize
/dev/sdd1
17.14G 17.14G
/dev/sdb1
17.14G 17.14G
/dev/sdc1
17.14G 17.09G

4.9.4. Specifying Units

To specify the unit for the LVM report display, use the --units argument of the report command. You
can specify (b)ytes, (k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (e)xabytes, (p)etabytes, and
(h)uman-readable. The default display is human-readable. You can override the default by setting the
units parameter in the global section of the lvm.conf file.
The following example specifies the output of the pvs command in megabytes rather than the default
gigabytes.
# pvs --units m
PV
VG
/dev/sda1
/dev/sdb1
new_vg lvm2 a-
PFree
PFree
PFree
Fmt
Attr PSize
lvm2 --
17555.40M 17555.40M
17552.00M 17552.00M
PFree
Specifying Units
53

Advertisement

Table of Contents
loading

Table of Contents