Eduardo has uploaded a new change for review.
Change subject: lvm: Prevent auto-activation of logical volumes. ......................................................................
lvm: Prevent auto-activation of logical volumes.
When using FC storage, physical volumes are connected during boot, and vdsm logical volumes are auto-activated by /etc/rc.sysinit and/or /etc/init.d/netfs.
This patch prevents auto-activation of vdsm volumes using new --setactivationskip and --ignoreactivationskip options, introduced in lvm 2.02.100.
Note: The change of existing volumes should be done with a little app running when installing or upgrading vdsm. In addition it should be executable from command line. Should not be part of the vdsm code.
Change-Id: Iab9b7579990d934c60999b4c603c3acf46557be1 Bug-Url: https://bugzilla.redhat.com/1009812 Signed-off-by: Eduardo ewarszaw@redhat.com --- M vdsm/storage/lvm.py 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/36/20836/1
diff --git a/vdsm/storage/lvm.py b/vdsm/storage/lvm.py index 0c2964e..2561ae4 100644 --- a/vdsm/storage/lvm.py +++ b/vdsm/storage/lvm.py @@ -769,6 +769,7 @@ lvnames = tuple("%s/%s" % (vg, lv) for lv in lvs) cmd = ["lvchange"] cmd.extend(LVM_NOBACKUP) + cmd.append('--ignoreactivationskip') if isinstance(attrs[0], str): # ("--attribute", "value") cmd.extend(attrs) @@ -1023,7 +1024,8 @@ cont = {True: "y", False: "n"}[contiguous] cmd = ["lvcreate"] cmd.extend(LVM_NOBACKUP) - cmd.extend(("--contiguous", cont, "--size", "%sm" % size)) + cmd.extend(("--setactivationskip", "y", "--ignoreactivationskip", + "--contiguous", cont, "--size", "%sm" % size)) if initialTag is not None: cmd.extend(("--addtag", initialTag)) cmd.extend(("--name", lvName, vgName))