Re: Possibility to have a "transient" snapshot?

2014-12-10 Thread James West
I was just looking into using overlayfs, and although it has some 
promise, I think it's biggest drawback is the upperdir will have to be 
some sort of storage backed filesystem. From my limited understanding of 
tmpfs, it's not supposed to be the greatest with many large files (and 
my system in particular would be downloading many large movies/videos, 
and doing any kind of os update to test it would involve many changes 
all over the volume, which could be problematic to commit to a golden 
state.)


I could partition the main drive in 2 parts, and dynamically zero-out 
then create the volume in the second partition on each boot, but I'm 
still saving no drive writes, and not really extending the life of the 
hardware (which is one of my premises.)


On 05/12/2014 11:12 PM, Chris Murphy wrote:

On Fri, Dec 5, 2014 at 11:27 AM, James West  wrote:


General idea would be to have a transient snapshot (optional quota support
possibility here) on top of a base snapshot (possibly readonly). On system
start/restart (whether clean or dirty), the transient snapshot would be
flushed, and the system would restart the snapshot, basically restarting
from the base snapshot.

Sounds similar to this idea:
http://0pointer.net/blog/revisiting-how-we-put-together-linux-systems.html

About 1/3 of the way down it gets to a proposal to Btrfs as a way to
get to a stateless system, which is basically what you want to be able
to rollback to. A variation on this that might serve the use case
better is seed device. You can either drop the added device that
stores changes to the seed device, or the volume (seed+added device)
can become another seed if you want to make the current state
persistent at next boot.

And still another possibility is overlayfs, which isn't Btrfs specific.





--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Possibility to have a "transient" snapshot?

2014-12-05 Thread James West
This is just a random idea that popped through my mind while I was 
looking into hardening a filesystem against damage, might be 
impractical, but the idea seems promising, and well suited to a snapshot 
file system.


I'm sure some creative shell scripting could do something like this 
already, but I was more looking for something more bulletproof.


General idea would be to have a transient snapshot (optional quota 
support possibility here) on top of a base snapshot (possibly readonly). 
On system start/restart (whether clean or dirty), the transient snapshot 
would be flushed, and the system would restart the snapshot, basically 
restarting from the base snapshot. If desired, the transient snapshot 
could be promoted to a regular snapshot (say after a software upgrade). 
If desired, a different base snapshot could be selected (although I'm 
sure the file system would have to be restarted to do this)


From a caching perspective, this could make a noticable performance 
difference, since if you're running in a transient snapshot, the file 
system can be _extremely_ lazy about committing changes to disk.


For the optional quote support I mentioned, on an unattended box, if the 
quota gets exceeded, a system reboot would probably fully correct the 
system. (Presumably a log file got out of control in that situation).

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html