Browse Source

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>
lilik-openwrt-22.03
Daniel Golle 3 years ago
parent
commit
194e7f0286
No known key found for this signature in database GPG Key ID: 5A8F39C31C3217CA
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      utils/uvol/files/lvm.sh
  2. +2
    -2
      utils/uvol/files/uvol

+ 2
- 2
utils/uvol/files/lvm.sh 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() {


+ 2
- 2
utils/uvol/files/uvol 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


Loading…
Cancel
Save