public:btrfs_snapshot_size
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
public:btrfs_snapshot_size [2016/04/01 00:41] – created fangfufu | public:btrfs_snapshot_size [2018/03/31 00:38] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== BTRFS snapshot size ====== | ||
+ | * First you need to enable quota | ||
+ | <code bash> | ||
+ | sudo btrfs quota enable /home | ||
+ | </ | ||
+ | * You need to wait for BTRFS so scan the filesystem for quota usage, then | ||
+ | <code bash> | ||
+ | sudo btrfs qgroup show /home | ||
+ | </ | ||
+ | * You get output which looks like this: | ||
+ | < | ||
+ | qgroupid | ||
+ | -------- | ||
+ | 0/5 | ||
+ | 0/410 96.00KiB | ||
+ | 0/ | ||
+ | 0/ | ||
+ | </ | ||
+ | '' | ||
+ | ===== Deleting snapshots ===== | ||
+ | |||
+ | |||
+ | * You can list all the subvolume by running this: | ||
+ | <code bash> | ||
+ | sudo btrfs subvolume list /home | ||
+ | </ | ||
+ | Note that this will display the link between the '' | ||
+ | |||
+ | * Note that if you are using snapper, you should delete snapshots using: | ||
+ | <code bash> | ||
+ | snapper -c home delete $SNAPPER_ID | ||
+ | </ | ||
+ | You shouldn' | ||
+ | |||
+ | ===== Re-initialise qgroups ===== | ||
+ | If your filesystem has just suffered an episode of catastrophic failure, you might need to re-initialise things. A Snapper rollback can cause it. | ||
+ | <code bash> | ||
+ | for i in $(btrfs qgroup show /home | tail -n+3 | cut -d ' ' -f 1); do btrfs qgroup destroy $i /home; done | ||
+ | btrfs quota disable /home | ||
+ | btrfs quota enable /home | ||
+ | </ |