Bug 204998

Summary: snapshots should still be readable when 100% full
Product: Red Hat Enterprise Linux 4 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Petr Rockai <prockai>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: agk, dwysocha, mbroz, olle
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-03-01 09:26:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 178979    
Bug Blocks:    

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 ***