6

I use btrfs snapshots quite a bit, and one of the things that interests me is how much space a given snapshot takes up - or to be more specific - how much exclusive data a btrfs snapshot is taking up, so that I know if I delete the snapshot, how much space I would free up.

The only way I know of finding out this information is by enabling btrfs quotas with

# btrfs quota enable /

and running

# btrfs qgroup show /

This is very effective. The thing is - I don't actually use btrfs quotas for anything other than this, which means I have the choice of either always having btrfs quotas enabled, or enabling them temporarily just before running the "btrfs qgroup show /" command, and immediately disabling them. Also, last I heard, btrfs quotas were still experimental (am I wrong?).

Basically what I want to know is:

  1. Does keeping btrfs quotas enabled impact system stability?
  2. Does keeping btrfs quotas enabled impact system performance?

I realize that the "to be safe" answer is to only enable quotas when I need them, but I'm actually making a script that runs "btrfs qgroup show /" and prints the output in a more readable form, and adding code that enables and disables quotas all the time slows down the script considerably, and adds complexity, so I'd rather keep quotas enabled all the time, but I have no clue if there's a downside to it.

  • I can't really answer about the impacts, but I have two comments: (1) last time I used Btrfs quotas (around Linux 3.15 maybe?) there were bugs that caused it to calculate negative usage, and (2) leaving quotas enabled all the time is likely better (faster, more stable) than turning them on and off over and over again. – Celada Mar 16 '15 at 6:28
  • NOTE: btrfs is still not considered a production grade filesystem at this time. So I would not be storing any critical information on this type of filesystem. – mdpc Mar 16 '15 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.