Federico Simoncelli 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/21500/ for refreshing multiple
logical volumes in one call.

Change-Id: I5f142ebca7a00d45f2500ad2631fab2366f2f7db
Bug-Url: https://bugzilla.redhat.com/1009812
Signed-off-by: Nir Soffer <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/21291
Reviewed-by: Federico Simoncelli <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/21501
Reviewed-by: Allon Mureinik <[email protected]>
---
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
  Allon Mureinik: Looks good to me, but someone else must approve



-- 
To view, visit http://gerrit.ovirt.org/21501
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f142ebca7a00d45f2500ad2631fab2366f2f7db
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Nir Soffer <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: [email protected]
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to