Change in vdsm[master]: Live Merge: Mark active layer ILLEGAL before pivoting

danken at redhat.com danken at redhat.com
Tue Sep 2 12:42:40 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: Live Merge: Mark active layer ILLEGAL before pivoting
......................................................................


Live Merge: Mark active layer ILLEGAL before pivoting

A block commit of the active layer takes place in two phases.  First,
data is copied from the current leaf to its parent.  During this time,
all writes to the disk are mirrored to both volumes.  When this process
converges the two volumes are and will remain identical due to ongoing
drive mirroring by qemu.  At this point we instruct libvirt to perform a
pivot from the current leaf to the new leaf.  Once this is complete we
synchronize our metadata and end the job.

If we are catastrophically interrupted (lose contact with the host)
between the pivot request and final metadata synchronization there is
currently no way to know whether the pivot actually happened.  This
could be dangerous because restarting the VM on another host with the
wrong leaf volume could lead to data corruption.

The solution is to mark the current leaf ILLEGAL before requesting a
pivot.  Since the volumes are identical at this point it will always be
safe to rerun the VM using the new leaf.  A subsequent patch will take
advantage of this ILLEGAL marker to provide engine with a reliable and
correct volume chain for this recovery scenario.

Change-Id: I97ce8fbdfad7c81181a206f160ffdd647c552d4d
Signed-off-by: Adam Litke <alitke at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/31787
Reviewed-by: Francesco Romani <fromani at redhat.com>
Reviewed-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 11 insertions(+), 3 deletions(-)

Approvals:
  Nir Soffer: Looks good to me, but someone else must approve
  Adam Litke: Verified
  Federico Simoncelli: Looks good to me, approved
  Francesco Romani: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I97ce8fbdfad7c81181a206f160ffdd647c552d4d
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list