Dan Kenigsberg has submitted this change and it was merged. Change subject: lvm: deactivate lvs during bootstrap ......................................................................
lvm: deactivate lvs during bootstrap When using FC storage, physical volumes are connected during boot, and vdsm logical volumes are auto-activated by both /etc/rc.sysinit and /etc/init.d/netfs startup scripts. These logical volumes do not pick changes done by the SPM on the storage, which may lead to data corruption sooner or later, when a vm is trying to write to logical volume with stale meta data. This patch check all vdsm logical volumes during lvm bootstrap and deactivate them if possible. Special logical volumes are refreshed, since they are accessed early when connecting to storage pool, possibly before lvm bootstrap is done. Open logical volumes are skipped because we assume that they use correct meta data when opened. To fix the auto-activation during boot, we could perform this only on the first start of the service and limit the operation to FC storage. However, we decided to use this on all block storage types, and on every start of the service, as additional layer of protection from logical volumes left active after unclean shutdown of the service, or other failures to deactivate logical volumes. Deactivation adds up to two lvchange calls for each volume group with active logical volumes. After the first service start, logical volumes are typically inactive and this change adds minimal additional cost, refreshing active special logical volumes. Depends on http://gerrit.ovirt.org/#/c/19871 for refreshing multiple logical volumes in one call. Change-Id: I5f142ebca7a00d45f2500ad2631fab2366f2f7db Bug-Url: https://bugzilla.redhat.com/1009812 Signed-off-by: Nir Soffer <nsof...@redhat.com> Reviewed-on: http://gerrit.ovirt.org/21291 Reviewed-by: Federico Simoncelli <fsimo...@redhat.com> --- M vdsm/storage/hsm.py M vdsm/storage/lvm.py 2 files changed, 45 insertions(+), 1 deletion(-) Approvals: Nir Soffer: Verified Federico Simoncelli: Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/21291 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5f142ebca7a00d45f2500ad2631fab2366f2f7db Gerrit-PatchSet: 9 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches