Bug 1683945

Summary: [RFE] lvm should hint on minimal native vdo volume size
Product: Red Hat Enterprise Linux 8 Reporter: Roman Bednář <rbednar>
Component: vdoAssignee: bjohnsto
Status: CLOSED ERRATA QA Contact: Filip Suba <fsuba>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.1CC: agk, awalsh, corwin, fsuba, heinzm, jbrassow, msnitzer, prajnoha, zkabelac
Target Milestone: rcKeywords: FutureFeature
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 6.2.3.97 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-04 02:01:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roman Bednář 2019-02-28 07:57:35 UTC
There is minimal size for vdo volume as such (non-native) and if the size is below 
minimum vdo exits with “Out of space” error.
 
It would enhance user experience if lvm would 
hint on the minimal native vdo size instead of “command failed” message.


Current behaviour:

# lvcreate --type vdo -L2G -y vg
vdoformat: formatVDO failed on '/dev/vg/vpool0': VDO Status: Out of space
  Command /usr/bin/vdoformat failed.
  Cannot format VDO pool volume vg/vpool0.

# lvcreate --type vdo -L3G -y vg
vdoformat: formatVDO failed on '/dev/vg/vpool0': VDO Status: Out of space
  Command /usr/bin/vdoformat failed.
  Cannot format VDO pool volume vg/vpool0.

# lvcreate --type vdo -L4G -y vg
  Logical volume "lvol0" created.



Suggestion:

# lvcreate --type vdo -L3G -y vg
    Minimal size of vdo volume is 4G.

# lvcreate -v --type vdo -L3G -y vg
vdoformat: formatVDO failed on '/dev/vg/vpool0': VDO Status: Out of space
  Command /usr/bin/vdoformat failed.
  Cannot format VDO pool volume vg/vpool0.
  Minimal size of vdo volume is 4G.

Comment 1 Jonathan Earl Brassow 2019-03-06 14:30:47 UTC
Bruce, would you be willing to take a stab at a patch for this?

Comment 3 Andy Walsh 2020-05-15 17:35:27 UTC
Since this is more of a 'vdoformat' utility change, I'm moving the bug to the vdo component.

Comment 7 Roman Bednář 2020-07-10 07:13:52 UTC
Verified with latest rpms, VDO now hints users what the min size should be in bytes.

# lvcreate --type vdo -L4.70g vg
  Rounding up size to full physical extent 4.70 GiB
Minimum required size for VDO volume: 5063921664 bytes
vdoformat: formatVDO failed on '/dev/vg/vpool0': VDO Status: Out of space
  Command /usr/bin/vdoformat failed.
  Cannot format VDO pool volume vg/vpool0.

# lvcreate --type vdo -L4.72g vg
  Rounding up size to full physical extent 4.72 GiB
    Logical blocks defaulted to 523108 blocks.
    The VDO volume can address 2 GB in 1 data slab.
    It can grow to address at most 16 TB of physical storage in 8192 slabs.
    If a larger maximum size might be needed, use bigger slabs.
  Logical volume "lvol0" created.

# rpm -qa | egrep "lvm2|vdo" | sort
kmod-kvdo-6.2.3.107-73.el8.x86_64
lvm2-2.03.09-3.el8.x86_64
lvm2-libs-2.03.09-3.el8.x86_64
lvm2-lockd-2.03.09-3.el8.x86_64
vdo-6.2.3.107-14.el8.x86_64

Comment 10 errata-xmlrpc 2020-11-04 02:01:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (kmod-kvdo bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4551