Change in vdsm[master]: lvm: Check if device in VG before extend

nsoffer at redhat.com nsoffer at redhat.com
Wed Sep 9 15:44:51 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: lvm: Check if device in VG before extend
......................................................................


Patch Set 1:

(2 comments)

Looks good, needs better logging and more detailed commit message.

https://gerrit.ovirt.org/#/c/45946/1//COMMIT_MSG
Commit Message:

Line 6: 
Line 7: lvm: Check if device in VG before extend
Line 8: 
Line 9: Before extending a VG, VDSM needs to check that none of
Line 10: the additional devices are not already part of the VG.
Please describe what why this check is neede, and what happens without this protection. Add vgs or pvs output showing the "unknown" pvs to make this clear.
Line 11: 
Line 12: Change-Id: Ifec2503094d6a0ecdd32e5e62f9c01a1469145f3
Line 13: Backport-To: 3.6
Line 14: Bug-Url: https://bugzilla.redhat.com/1261531


https://gerrit.ovirt.org/#/c/45946/1/vdsm/storage/lvm.py
File vdsm/storage/lvm.py:

Line 985:     vg = _lvminfo.getVg(vgName)
Line 986: 
Line 987:     member_pvs = set(vg.pv_name).intersection(pvs)
Line 988:     if member_pvs:
Line 989:         log.error("These PVs already belong to VG %s", member_pvs)
Add also vg name to the log, something like:

    "Cannot extend vg %s: pvs already belong to vg: %s", vg.name, member_pvs

Also lets unify the messages and use always "vg" and "pv", instead of "VG" and "PV".
Line 990:         raise se.VolumeGroupExtendError(vgName, pvs)
Line 991: 
Line 992:     # Format extension PVs as all the other already in the VG
Line 993:     _initpvs(pvs, int(vg.vg_mda_size) / 2 ** 20, force)


-- 
To view, visit https://gerrit.ovirt.org/45946
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifec2503094d6a0ecdd32e5e62f9c01a1469145f3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Fred Rolland <frolland at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list