On Fri, Sep 2, 2016 at 6:59 AM, Neil Bothwick <n...@digimed.co.uk> wrote: > On Thu, 1 Sep 2016 13:54:40 -0400, Rich Freeman wrote: > >> > Bind mounts? I thought you would use btrfs subvolumes! >> > >> >> Often the bind mounts point to btrfs subvolumes. >> >> Yeah, I guess I could directly mount all those subvolumes, but I find >> symlinks or bind mounts easier. The other factor is that if I have >> unnecessary subvolumes then I'm having to manage snapshots across more >> of them and my snapshots are less atomic, since snapshots don't cross >> subvolume boundaries (which is something which ought to be >> configurable). > > I use a script to handle my snapshots, so snapshotting multiple > subvolumes is less of an issue, but an option to snapshot a subvolume and > all its children, or even the whole filesystem, would be nice. >
Note that what I want is a snapshot that crosses subvolume boundaries, so that it is atomic. Not a program that just iterates creating individual snapshots that don't all happen at the exact same time. I'd have to look a little more closely at how the filesystem roots work to see if that is actually possible. I don't know if the root node actually covers all the subvolumes it contains, and how exactly subvolumes are bound to their containing directories. I guess if the structure of the tree doesn't allow a single snapshot at the data structure level another option would be for the filesystem to create a write barrier / lock of some kind while the snapshots are being created, so they end up being consistent anyway. This approach could work even across different filesystems. -- Rich