[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



On Wed, May 14, 2008 at 07:30:17PM -0400, Mikulas Patocka wrote:
> With merging, it will cause corruption --- if one snapshot is merging and 
> you don't have all the other snapshots loaded, the non-active snapshots 
> won't be updated as the merging goes on. So they'll be corrupted.
 
If that can happen it suggests the detailed set of activation steps needs
further refining and is not correct yet.

> Currently the contstraint is "if the device is open, you can't deactivate 
> it". I'd like change it to "if the device is open or some of its snapshots 
> are open, you can't deactivate it".

Catch-22 then.  Which do you deactivate first?  We cannot handle that
at kernel level with the current interface.

But by all means add that extra protection to the userspace code.
The userspace code should not assume it happened though.

> Even without merging, the current approach is not perfect, as you will end 
> up with a device that you can't deactivate (the origin is deactivated, the 
> snapshot is active; lvchange -an on the snapshot will return error; 
> lvchange -an on the origin will see that it is already inactive and do 
> nothing)

That can be fixed: lvchange -an on the origin should complete the process.
(It probably used to do that before some optimisation got added.)
 
Alasdair
-- 
agk redhat com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]