[lvm-devel] Re: Deactivating volume with mounted snapshot

Alasdair G Kergon agk at redhat.com
Fri May 16 14:37:25 UTC 2008


On Fri, May 16, 2008 at 10:21:37AM -0400, Mikulas Patocka wrote:
> The change in the patch is safe because when someone is creating snapshot 
> and simultaneously writing to the origin device, it is unspecified, which 
> write requests trigger reallocations in the snapshot and which not.
 
That isn't relevant: What matters is that any filesystem on the origin
LV is quiesced first.

Sequence is:
  perform necessary memory allocations (snapshot ctr)
  suspend origin LV (quiesce filesystem)
  resume snapshots so that changes start to be tracked (sets active = 1)
  resume origin (resumes filesystem)

> I found another problem --- the lvchange -an is currently safe, but it is 
> unsafe with snapshot merging. Ideally it should suspend all the devices 
> first and then call destructors on the snapshots. I'll look at it.

Again, this points to the interface not being right yet.
 
Alasdair
-- 
agk at redhat.com




More information about the lvm-devel mailing list