Btrfs for Rawhide users?
Btrfs for Rawhide users?
Posted Nov 19, 2009 6:18 UTC (Thu) by jimparis (guest, #38647)Parent article: Btrfs for Rawhide users?
Perhaps the biggest problem is that Btrfs snapshots cover the entire filesystemAnother problem is that Btrfs snapshots only cover the entire filesystem. Unless you're in the habit of dropping to single-user mode to do your upgrades and subsequent recoveries, applications will left in a highly inconsistent state when their disk storage suddenly changes from under them.
Makes me wonder if integrating something like checkpoint/restart would be required to make system-wide snapshotting complete. Or "virsh save" + btrfs snapshots, etc.
Posted Nov 19, 2009 11:08 UTC (Thu)
by farnz (subscriber, #17727)
[Link]
I may be misunderstanding the btrfs filesystem format, but it looks to me like a future development of btrfs would allow you to keep snapshots of subtrees, and to assemble views of the filesystem from a mixture of snapshots. I certainly can't see how the B-trees prohibit this.
Of course, there's admin complexity galore here - but I can envisage something that goes "snapshot the filesystem. Replace all of /var except /var/rpm with the live state, leaving /var/rpm as part of this snapshot, replace /home with the live state" as part of a future btrfs version. Then, once the upgrade of the snapshot is complete, you can do "swap snapshot with live state", and get the atomic update you wanted.
Posted Nov 19, 2009 11:31 UTC (Thu)
by NRArnot (subscriber, #3033)
[Link]
Even better using two disks, of course. Click-click scritch ...
Posted Nov 19, 2009 13:07 UTC (Thu)
by epa (subscriber, #39769)
[Link]
Posted Nov 19, 2009 13:55 UTC (Thu)
by masoncl (subscriber, #47138)
[Link] (2 responses)
So it isn't entirely true that you have to roll back the entire filesystem, but you would have to roll back the entire thing that you've snapshotted.
Exactly what to snapshot is a similar problem to breaking up the FS tree into partitions. Do we keep / and /home separate? If the upgrade fails do we want to roll back just one of the two?
It's a fun problem...to answer another question I see farther down, can we easily recover the space from old snapshots deleted, yes.
Posted Nov 23, 2009 22:08 UTC (Mon)
by oak (guest, #2786)
[Link] (1 responses)
And if running processes are still keeping files open from the old state
Kill all those process when deleting the old snapshot? Tell that snapshot
Posted Nov 27, 2009 3:29 UTC (Fri)
by xoddam (subscriber, #2322)
[Link]
This 'just works' even in the absence of snapshots.
With snapshots, it means the disk space in question won't be reclaimable when old snapshots are removed, but it won't stop the snapshots themselves from being removed. The space will become reclaimable only when the data is no longer in use -- i.e. when the inode is no longer open in the live, mounted filesystem.
Posted Nov 22, 2009 16:47 UTC (Sun)
by anton (subscriber, #25547)
[Link]
Of course, only covering one file system can pose a consistency
problem if the application distributes its data across several file
systems. It would be cool if one could snapshot all file systems at
the same (logical) time.
Btrfs for Rawhide users?
Btrfs for Rawhide users?
Btrfs for Rawhide users?
Btrfs for Rawhide users?
Btrfs for Rawhide users?
we easily recover the space from old snapshots deleted, yes.
of the file system (like previous version of the C-library kept open by
every process mmap), what do you do?
is busy and cannot be deleted and just list processes or recommend reboot
to get rid of them?
a file which a process holds open is still an inode in the mounted fs, even if no filename points to it.
Yes, for most applications you will probably have to shut them down
before switching a file system from one snapshot to another one. You
usually don't have to do that when you do a snapshot, because (if
Btrfs gets it right) the snapshot will represent some state that
logically existed during the execution of the application. When you
recover from that snapshot, it's as if the application was killed or
crashed by itself at that point, and the application should be able to
recover from that. For upgrades the package management system and the
scripts for the application package tend to perform whatever shutdowns
and restarts are necessary for the particular package (at least that's
my experience in Debian, don't know about Fedora).
Btrfs for Rawhide users?