Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1512199 - lvs does not use International System of Units (SI) metric prefix
Summary: lvs does not use International System of Units (SI) metric prefix
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2
Version: 26
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: LVM and device-mapper development team
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-11 13:10 UTC by Germano Massullo
Modified: 2017-11-11 17:24 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-11-11 15:24:08 UTC

Attachments (Terms of Use)

Description Germano Massullo 2017-11-11 13:10:44 UTC
Description of problem:

When you run
# lvs -a
the column LSize shows data like
but according to International System of Units (SI) metric prefix, it should be G not g

Moreover in my opinion you should either use GiB

or GB


Version-Release number of selected component (if applicable):

Comment 1 Zdenek Kabelac 2017-11-11 15:24:08 UTC
It's documented in man page - and output format of these lvm2 command have a long history and it's being parsed by numerous tools.

Lower 'k'  is  power-of-2 based
Capital 'K' is  SI 10 based unit

So any change on output format would simply break them all.

Users writing any new tool can use new optional flags - so user can have output in ANY units format he desire:


lvs --units 1k

resulting in output in  Kibibytes  (power of 2 based)

lvs --units 1K

resulting in output in  Kilobytes   (10-based SI)

Units format is totally free (i.e. you can get result in  3k units if you need so)

For backward compatibility reasons this default format will not change.

If user need by 'default' see the output in 'K' units - user may
set 'lvm.conf'     global/units   =  "K"

(Default is ATM "r"  being 'readable power-of-2 based)

Comment 2 Germano Massullo 2017-11-11 17:24:51 UTC
Zdenek thank you for the extensive explanation

Note You need to log in before you can comment on or make changes to this bug.