Adam Litke has posted comments on this change.
Change subject: tests: Add initial FakeLVM tests and fix errors ......................................................................
Patch Set 2:
(1 comment)
https://gerrit.ovirt.org/#/c/47857/2/tests/storagefakelib.py File tests/storagefakelib.py:
Line 26: Line 27: Line 28: class FakeLVM(object): Line 29: _PV_SIZE = 10 << 30 # We pretend all PVs are 10G in size Line 30: _PV_PE_SIZE = 128 << 20 # Found via inspection of real environment
I think that extent size is the smallest unit you can manage in lvm, and me
Actually there is no constant for this one either. It's hard-coded in the same code (_createpv) as a default argument! Please let's stick with these clean constants that can be verified against the supplied lvm.py output in the tests. Line 31: _PV_MDA_COUNT = 2 # The number of PEs used for metadata areas Line 32: _PV_UNUSABLE = (_PV_PE_SIZE * # 2 PE for metadata + 1 PE to hold a header Line 33: (1 + _PV_MDA_COUNT)) Line 34: