From 194e7f0286b880b34f62a5d6b556753fa1aa470e Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 6 Jul 2021 05:20:12 +0100 Subject: [PATCH] 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 --- utils/uvol/files/lvm.sh | 4 ++-- utils/uvol/files/uvol | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/utils/uvol/files/lvm.sh b/utils/uvol/files/lvm.sh index 4b295faf17..06a4920b8c 100644 --- a/utils/uvol/files/lvm.sh +++ b/utils/uvol/files/lvm.sh @@ -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() { diff --git a/utils/uvol/files/uvol b/utils/uvol/files/uvol index 04547ce622..4ecd2e165a 100644 --- a/utils/uvol/files/uvol +++ b/utils/uvol/files/uvol @@ -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