[lvm-devel] Allowing an actively merging snapshot to be removed?
Mikulas Patocka
mpatocka at redhat.com
Thu Apr 22 00:01:32 UTC 2010
On Wed, 21 Apr 2010, Mike Snitzer wrote:
> On Wed, Apr 21 2010 at 2:35am -0400,
> Mike Snitzer <snitzer at redhat.com> wrote:
>
> > when a merge is active the merging
> > snapshot LV is accessible (by user with lvremove); so removing the
> > merging snapshot is currently allowed (stops merge, deletes
> > snapshot); should it be allowed?
>
> Hi Mikulas,
>
> What are your thoughts on this corner case?
>
> thanks,
> Mike
I think the merging snapshot LV shouldn't be accessible (I initially coded
it so that it is renamed and disappears completely). There is nothing that
the admin can do with the merging snapshot, so you don't have to show it
in "lvs" output.
You can't allow the admin to delete the merging snapshot. This would cause
data loss. The origin contains transient data during merge process
(partially the old and partially the new volume), if you delete the
merging snapshot and directly access the origin, the result is a mess.
You can assume that the admin doesn't know the exact logic of merging
(i.e. he may not be aware that deleting the merging snapshot destroys all
the data on the origin instantly), so you must definitely prevent the
tools from doing this.
You should allow the admin to delete the origin (and delete the merging
snapshot with it). You can also allow deleting of other non-merging
snapshots, while the merge is in progress.
Mikulas
More information about the lvm-devel
mailing list