Eduardo has uploaded a new change for review.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
[WIP] metaSize calculation as a module function.
Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Signed-off-by: Eduardo ewarszaw@redhat.com --- M vdsm/storage/blockSD.py 1 file changed, 23 insertions(+), 23 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/90/11690/1
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py index 9b9674e..aa4059a 100644 --- a/vdsm/storage/blockSD.py +++ b/vdsm/storage/blockSD.py @@ -269,6 +269,27 @@ return
+def metaSize(vgName): + ''' Calc the minimal meta volume size in MB''' + # In any case the metadata volume cannot be less than 512MB for the + # case of 512 bytes per volume metadata, 2K for domain metadata and + # extent size of 128MB. In any case we compute the right size on line. + vg = lvm.getVG(vgName) + minmetasize = (SD_METADATA_SIZE / sd.METASIZE * int(vg.extent_size) + + (1024 * 1024 - 1)) / (1024 * 1024) + metaratio = int(vg.extent_size) / sd.METASIZE + metasize = (int(vg.extent_count) * sd.METASIZE + + (1024 * 1024 - 1)) / (1024 * 1024) + metasize = max(minmetasize, metasize) + if metasize > int(vg.free) / (1024 * 1024): + raise se.VolumeGroupSizeError("volume group has not enough extents %s" + " (Minimum %s), VG may be too small" % + (vg.extent_count, + (1024 * 1024) / sd.METASIZE)) + log.info("size %s MB (metaratio %s)" % (metasize, metaratio)) + return metasize + + class VGTagMetadataRW(object): log = logging.getLogger("storage.Metadata.VGTagMetadataRW") METADATA_TAG_PREFIX = "MDT_" @@ -449,27 +470,6 @@ lvmActivationNamespace)
@classmethod - def metaSize(cls, vgroup): - ''' Calc the minimal meta volume size in MB''' - # In any case the metadata volume cannot be less than 512MB for the - # case of 512 bytes per volume metadata, 2K for domain metadata and - # extent size of 128MB. In any case we compute the right size on line. - vg = lvm.getVG(vgroup) - minmetasize = (SD_METADATA_SIZE / sd.METASIZE * int(vg.extent_size) + - (1024 * 1024 - 1)) / (1024 * 1024) - metaratio = int(vg.extent_size) / sd.METASIZE - metasize = (int(vg.extent_count) * sd.METASIZE + - (1024 * 1024 - 1)) / (1024 * 1024) - metasize = max(minmetasize, metasize) - if metasize > int(vg.free) / (1024 * 1024): - raise se.VolumeGroupSizeError( - "volume group has not enough extents %s (Minimum %s), VG may " - "be too small" % (vg.extent_count, - (1024 * 1024) / sd.METASIZE)) - cls.log.info("size %s MB (metaratio %s)" % (metasize, metaratio)) - return metasize - - @classmethod def create(cls, sdUUID, domainName, domClass, vgUUID, storageType, version): """ Create new storage domain @@ -509,7 +509,7 @@ raise se.StorageDomainIsMadeFromTooManyPVs()
# Create metadata service volume - metasize = cls.metaSize(vgName) + metasize = metaSize(vgName) lvm.createLV(vgName, sd.METADATA, "%s" % (metasize)) # Create the mapping right now so the index 0 is guaranteed # to belong to the metadata volume. Since the metadata is at @@ -721,7 +721,7 @@
lvm.extendVG(self.sdUUID, devices, force) self.updateMapping() - newsize = self.metaSize(self.sdUUID) + newsize = metaSize(self.sdUUID) lvm.extendLV(self.sdUUID, sd.METADATA, newsize)
def mapMetaOffset(self, vol_name, slotSize):
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1063/ (1/3)
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/209/ (2/3)
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 1:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1098/ (3/3)
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 1:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1063/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1098/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/209/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/418/ (1/3)
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1307/ (2/3)
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1272/ (3/3)
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/1272/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/1307/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/418/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2233/ (1/2)
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 3:
Build Started http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2172/ (2/2)
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 3:
Build Successful
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/2233/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/2172/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/11690 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: If90ba75d11c4962f2e52150e5f381cd93d0e8f35 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Haim Ateya hateya@redhat.com Gerrit-Reviewer: Yeela Kaplan ykaplan@redhat.com Gerrit-Reviewer: oVirt Jenkins CI Server
Yeela Kaplan has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 3: Looks good to me, but someone else must approve
Itamar Heim has posted comments on this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Patch Set 3:
old. not touched for a while. please restore if relevant
Itamar Heim has abandoned this change.
Change subject: [WIP] metaSize calculation as a module function. ......................................................................
Abandoned
vdsm-patches@lists.fedorahosted.org