Bug 204998 - snapshots should still be readable when 100% full
Summary: snapshots should still be readable when 100% full
Keywords:
Status: CLOSED DUPLICATE of bug 427298
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2
Version: 4.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Petr Rockai
QA Contact:
URL:
Whiteboard:
Depends On: 178979
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-01 21:55 UTC by Corey Marthaler
Modified: 2009-03-01 09:26 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-03-01 09:26:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Corey Marthaler 2006-09-01 21:55:54 UTC
Description of problem:
At 100% full, the snapshot data becomes invalid, all access to it returns -EIO.

I obviously see why the write should fail, but a user should still be able to
recover their data. 

A full filesystem still allows the ability to read.

Comment 1 Milan Broz 2006-10-16 16:34:18 UTC
Only possible situation to keep snapshot full and readable is
when snapshots is overfilled by writes to snapshot only.
(In this sitation will fail only last write).

Any write to origin must invalidate snapshot immediatelly (inconsistent data).

This scenario can be usefull if origin is read only and snapshots are maintained
as separate COW devices (Xen clients etc.)

Implementation depends on upstream status (preliminary patch exist).


Comment 2 Olle Liljenzin 2006-11-03 15:07:01 UTC
This request makes me curious since I find the opposite situation to be a bigger
problem, i.e. snapshots are still readable when they are full (and inconsistent).

How do you make them "not readable" without first unmounting them?


Comment 3 Milan Broz 2006-11-03 15:32:05 UTC
Yes, there are two parts of problem - block device and actions in upper level
(e.g. filesystem).

Currently, full snapshot returns -EIO to all io requests.
But filesystem is still mounted and see incosistent data then.

On the block level it's is sufficient solution in comment #1 - in kernel.

Unmounting filesystem should precede deactivation of snapshot and this should be
done in userspace by dmeventd - it listens to messages from dm core and can take
appropriate action - e.g. warning (bug 178979) or force umount or user action.

DMeventd need extend functionality to manage this.


Comment 4 Milan Broz 2008-01-03 12:49:40 UTC
Final state should be that dmeventd will handle snapshot resize (so 100% full is
only temporary state). Dmeventd should resize snapshot or umount filesystem and
remove snapshot...

Setting dependence on snapshot DSO bug.

Comment 5 Petr Rockai 2009-03-01 09:26:31 UTC
It's not quite spring yet, but I'm cleaning up BZ a little. I know this is filed under RHEL 4, but I suppose we'll only address this in 5 anyway?

*** This bug has been marked as a duplicate of bug 427298 ***


Note You need to log in before you can comment on or make changes to this bug.