Hello Nir Soffer, Sahina Bose, I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/50854 to review the following change. Change subject: gluster: ensure LV size is multiple of VG's PE value ...................................................................... gluster: ensure LV size is multiple of VG's PE value Alignment value for JBOD is changed to 256 KiB from 0 in https://gerrit.ovirt.org/#/c/47959 and alignment value is used as PE value in VG creation. It resulted in following error for some JBOD disks. "DeviceError: ('Adding new lv is too large to fit in free space', u'vg-brick2-pool-brick2'" Size of LV should be multiple of PE value. But this calculation was done only for RAID volume not for JBOD and that was the casue for above error. With this patch, lv size will be adjusted to the multiples of PE always regardless of whether its RAID or JBOD. Change-Id: I3a1609544db36b16b5b8fc0a52d5ef04e770c18b Bug-Url: https://bugzilla.redhat.com/1270792 Signed-off-by: Ramesh Nachimuthu <rnach...@redhat.com> Reviewed-on: https://gerrit.ovirt.org/50802 Reviewed-by: Sahina Bose <sab...@redhat.com> Reviewed-by: Nir Soffer <nsof...@redhat.com> Continuous-Integration: Nir Soffer <nsof...@redhat.com> --- M vdsm/gluster/storagedev.py 1 file changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/54/50854/1 diff --git a/vdsm/gluster/storagedev.py b/vdsm/gluster/storagedev.py index 6ec47e2..da8f1f6 100644 --- a/vdsm/gluster/storagedev.py +++ b/vdsm/gluster/storagedev.py @@ -262,16 +262,14 @@ # a multiple of RAID stripe width if it is > minimum vg size # otherwise allocate a minimum of 0.5% of the data device size # and create data LV (poolDataSize) that has a size which is - # a multiple of stripe width - # For JBOD, this adjustment is not necessary + # a multiple of stripe width. vgSizeKib = int(_getDeviceSize(vg, 'KiB')) if _getDeviceSize(vg) < MIN_VG_SIZE: metaDataSizeKib = vgSizeKib * MIN_METADATA_PERCENT poolDataSize = vgSizeKib - metaDataSizeKib - if raidType: - metaDataSizeKib = (metaDataSizeKib - (metaDataSizeKib % alignment)) - poolDataSize = (poolDataSize - (poolDataSize % alignment)) + metaDataSizeKib = (metaDataSizeKib - (metaDataSizeKib % alignment)) + poolDataSize = (poolDataSize - (poolDataSize % alignment)) # Creating a thin pool from the data LV and the metadata LV # lvconvert --chunksize alignment --thinpool VOLGROUP/thin_pool -- To view, visit https://gerrit.ovirt.org/50854 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3a1609544db36b16b5b8fc0a52d5ef04e770c18b Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Ramesh N <rnach...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Sahina Bose <sab...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches