Recursive subvolume snapshots and deletion?
Heya!
So what's the story on recursive btrfs snapshotting and snapshot removal? Since a while systemd has now by default creating btrfs subvolumes for /var/lib/machines for example. Now, if that code is run inside a container, and the container itself already is stored in a subvolume we end up with a subvolume inside a subvolume, which currently breaks snapshotting and deletion of the outer container subvolume.
What's the plan regarding recursive versions of the operations? Any plan to add this? We could work around this in userspace, of course, but it would not be atomic, and I'd much prefer if the kernel could do this on its own!
Lennart
Quoted 10 lines · Lennart Poettering
Heya!
So what's the story on recursive btrfs snapshotting and snapshot removal? Since a while systemd has now by default creating btrfs subvolumes for
/var/lib/machinesfor example. Now, if that code is run inside a container, and the container itself already is stored in a subvolume we end up with a subvolume inside a subvolume, which currently breaks snapshotting and deletion of the outer container subvolume.
Quoted 4 lines
What's the plan regarding recursive versions of the operations? Any plan to add this? We could work around this in userspace, of course, but it would not be atomic, and I'd much prefer if the kernel could do this on its own!
Hi Lennart,
I've got a patch to btrfs-progs that can do the recursive snapshotting, let me clean it up and submit to Dave. For recursive deletion I think the same method can be used.
-chris
Quoted 17 lines · Chris Mason
Quoted 10 lines · Lennart Poettering
Heya!
So what's the story on recursive btrfs snapshotting and snapshot removal? Since a while systemd has now by default creating btrfs subvolumes for
/var/lib/machinesfor example. Now, if that code is run inside a container, and the container itself already is stored in a subvolume we end up with a subvolume inside a subvolume, which currently breaks snapshotting and deletion of the outer container subvolume.Quoted 4 lines
What's the plan regarding recursive versions of the operations? Any plan to add this? We could work around this in userspace, of course, but it would not be atomic, and I'd much prefer if the kernel could do this on its own!
Quoted 5 lines
Hi Lennart,
I've got a patch to btrfs-progs that can do the recursive snapshotting, let me clean it up and submit to Dave. For recursive deletion I think the same method can be used.
OK, so this means you want this to be solved in userspace, hence in a non-atomic fashion?
What precisely will your code do? Enumerate the subvolumes and simply snapshot all subvolumes below the desired path? Or anything smarter?
Lennart
Signature · 1 line
Lennart Poettering, Red Hat