4 ms·
btrfs snapshots have a lot of gotchas. Quoting myself: https://news.ycombinator.com/item?id=14724820 https://news.ycombinator.com/item?id=14724820
by RJIb8RBYxzAMX9u 9y ago
btrfs snapshots have a lot of gotchas. Quoting myself:
https://news.ycombinator.com/item?id=14724820 https://news.ycombinator.com/item?id=14724820
- ScottBurson 9y agoGood to know. I've used them only very rarely.
- cmurf 9y agoIf you have a mandatory flush to disk anytime there's a snapshot, they suddenly become a lot more expensive. They are still atomic in that the operation either did completely happen or not at all happen, if a crash occurs after the command returns, i.e. you don't end up with a partial or corrupt snapshot after you reboot. The need for a snapshot to be on disk when sending, what you cite says you get an obscure error "stale NFS file handle" not that you get missing files. If you're silently getting missing files on a send/receive, that's a bug and should be reported. I use snapshots quite a bit both for data, backup/replication with send/receive, and for root fs, and haven't had problems with it. The known problem with Btrfs snapshots is that they are deceptively cheap to create, but become expensive later on to delete due to back reference searching, freeing extents (or not if they're still held by other snapshots) and updating metadata. Dozens to small hundreds aren't normally a problem, in my use case I don't notice performance problems.