Specifying Units - Red Hat ENTERPRISE LINUX 5.1 - LVM ADMINISTRATION Manual

Table of Contents

Advertisement

Chapter 4. LVM Administration with CLI Commands
/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-
/dev/sdc1
new_vg lvm2 a-
/dev/sdd1
new_vg lvm2 a-
By default, units are displayed in powers of 2 (multiples of 1024). You can specify that units be
displayed in multiples of 1000 by capitalizing the unit specification (B, K, M, G, T, H).
The following command displays the output as a multiple of 1024, the default behavior.
# 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 the output as a multiple of 1000.
#
pvs --units G
PV
VG
/dev/sdb1
new_vg lvm2 a-
/dev/sdc1
new_vg lvm2 a-
/dev/sdd1
new_vg lvm2 a-
You can also specify (s)ectors (defined as 512 bytes) or custom units.
The following example displays the output of the pvs command as a number of sectors.
# pvs --units s
PV
VG
/dev/sdb1
new_vg lvm2 a-
/dev/sdc1
new_vg lvm2 a-
48
Fmt
Attr PSize
lvm2 --
17555.40M 17555.40M
17552.00M 17552.00M
17552.00M 17500.00M
17552.00M 17552.00M
Fmt
Attr PSize
17.14G 17.14G
17.14G 17.09G
17.14G 17.14G
Fmt
Attr PSize
18.40G 18.40G
18.40G 18.35G
18.40G 18.40G
Fmt
Attr PSize
35946496S 35946496S
35946496S 35840000S
PFree
PFree
PFree
PFree

Advertisement

Table of Contents
loading

This manual is also suitable for:

Enterprise linux 5.1 cluster logical volume manager

Table of Contents