On Sun, May 04, 2014 at 04:26:45PM -0700, Marc MERLIN wrote: > Actually, never mind Suse, does someone know whether you can revert to > an older snapshot in place? Not while the system's running useful services, no. > The only way I can think of is to mount the snapshot on top of the other > filesystem. This gets around the umounting a filesystem with open > filehandles problem, but this also means that you have to keep track of > daemons that are still accessing filehandles on the overlayed > filesystem. You have a good handle on the problems. > My one concern with this approach is that you can't free up the > subvolume/snapshot of the underlying filesystem if it's mounted and even > after you free up filehandles pointing to it, I don't think you can > umount it. > > In other words, you can play this trick to delay a reboot a bit, but > ultimately you'll have to reboot to free up the mountpoints, old > subvolumes, and be able to delete them. Yup. > Somehow I'm thinking Suse came up with a better method. I'm guessing it involves reflink copies of files from the snapshot back to the "original", and then restarting affected services. That's about the only other thing that I can think of, but it's got load of race conditions in it (albeit difficult to hit in most cases, I suspect). Hugo. > Even if you don't know Suse, can you think of a better way to do this? > > Thanks, > Marc > > On Sat, May 03, 2014 at 05:52:57PM -0700, Marc MERLIN wrote: > > (more questions I'm asking myself while writing my talk slides) > > > > I know Suse uses btrfs to roll back filesystem changes. > > > > So I understand how you can take a snapshot before making a change, but > > not how you revert to that snapshot without rebooting or using rsync, > > > > How do you do a pivot-root like mountpoint swap to an older snapshot, > > especially if you have filehandles opened on the current snapshot? > > > > Is that what Suse manages, or are they doing something simpler? > > > > Thanks, > > Marc > -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- That's not rain, that's a lake with slots in it. ---
Attachment:
signature.asc
Description: Digital signature
