Bug 204998 - snapshots should still be readable when 100% full
snapshots should still be readable when 100% full
Status: CLOSED DUPLICATE of bug 427298
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Petr Rockai
Depends On: 178979
  Show dependency treegraph
Reported: 2006-09-01 17:55 EDT by Corey Marthaler
Modified: 2009-03-01 04:26 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-03-01 04:26:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2006-09-01 17:55:54 EDT
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 12:34:18 EDT
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 10:07:01 EST
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 10:32:05 EST
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 07:49:40 EST
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 04:26:31 EST
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.