uvol: fix units with lvm backend

Free and total bytes are now properly returned as bytes by LVM2 as
requested. No longer multiply values.
Fix parameter order of 'create' command in usage output while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2021-07-06 05:20:12 +01:00
parent 42aa15b653
commit 194e7f0286
No known key found for this signature in database
GPG Key ID: 5A8F39C31C3217CA
2 changed files with 4 additions and 4 deletions

View File

@ -46,11 +46,11 @@ lvs() {
}
freebytes() {
echo $((vg_free_count * vg_extent_size * 1024))
echo $((vg_free_count * vg_extent_size))
}
totalbytes() {
echo $((vg_extent_count * vg_extent_size * 1024))
echo $((vg_extent_count * vg_extent_size))
}
existvol() {

View File

@ -17,9 +17,9 @@ commands:
total show total number of bytes
align show sector size in bytes
list [volname] list volumes
create volname type size create new volume
type: 'ro' or 'rw'
create volname size type create new volume
size: in bytes
type: 'ro' or 'rw'
remove volname delete volume
device volname show block device for mounting
size volname show size of volume