User: Password:
|
|
Subscribe / Log in / New account

Btrfs: Subvolumes and snapshots

Btrfs: Subvolumes and snapshots

Posted Jan 9, 2014 19:13 UTC (Thu) by iabervon (subscriber, #722)
In reply to: Btrfs: Subvolumes and snapshots by dlang
Parent article: Btrfs: Subvolumes and snapshots

The policy "I want snapshots, but I don't want them to take up more than 10% of my total space" is a complete disaster if applied as a limit. Your OS upgrades would fail for lack of space, even if you have plenty of free space, if you replace files accounting for 10% of your total space. (That is, you don't want to be prevented from unsharing things in your root subvolume, but that's the only operation that increases the amount of space used by snapshots-- creating a new snapshot takes pretty much no new space.)

What you actually want is a garbage collection policy, rather than a limit policy; in order to generate free space, the filesystem is allowed to delete some unmounted subvolumes in a particular order. So this goal is pretty far in implementation from what "quota" means in other filesystems.


(Log in to post comments)

Btrfs: Subvolumes and snapshots

Posted Jan 9, 2014 20:45 UTC (Thu) by dlang (subscriber, #313) [Link]

> The policy "I want snapshots, but I don't want them to take up more than 10% of my total space" is a complete disaster if applied as a limit. Your OS upgrades would fail for lack of space, even if you have plenty of free space,

for almost all the systems I run, the OS is far less than 10% of the total disk space. The majority of the space is used by data files, or software outside of the distro.

Btrfs: Subvolumes and snapshots

Posted Jan 9, 2014 20:55 UTC (Thu) by iabervon (subscriber, #722) [Link]

Even so, that's still: "You can't delete that brain image, because then it would count toward snapshots you weren't prevented from making."

Btrfs: Subvolumes and snapshots

Posted Jan 9, 2014 21:14 UTC (Thu) by dlang (subscriber, #313) [Link]

> Even so, that's still: "You can't delete that brain image, because then it would count toward snapshots you weren't prevented from making."

In theory you may be correct, but having used snapshots for over a decade, in practice, on non-toy sized filesystems, it just isn't a problem.

just like the OS isn't larger than 10% of the filesystem, neither is any individual item on it.

On existing sytems, the quota is not per snapshot, but for all snapshots combined. They also have a policy for what to do when you try and create a snapshot and there isn't space, which is usually to delete the oldest snapshot until there is space.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds