Open
Description
I am thinking that it might be a good idea to leave a percentage of a disk as slack. This can help rescue a full filesystem when extra USB sticks or loop devices are not available.
Example: mkfs.btrfs /dev/sdb1 /dev/sdc --slack 5%
This would reserve 5% slack on each disk. It should be possible to use a fixed size too, like 4G.
# btrfs device usage /
/dev/sda3, ID: 1
Device size: 233.47GiB
Device slack: 4.00GiB
Data,single: 71.00GiB
Metadata,single: 2.00GiB
System,single: 32.00MiB
Unallocated: 156.44GiB
It might be a good idea to add slack in the output of btrfs filesystem usage/show
too to make amount of slack more visible.
Overall:
Device size: 229.47GiB
Device slack: 4.00GiB
Device allocated: 73.03GiB
Device unallocated: 156.44GiB
Device missing: 0.00B
Used: 29.07GiB
Free (estimated): 199.66GiB (min: 199.66GiB)
Data ratio: 1.00
Metadata ratio: 1.00
Global reserve: 133.92MiB (used: 0.00B)
Multiple profiles: no
Data,single: Size:71.00GiB, Used:27.78GiB (39.13%)
/dev/sda3 71.00GiB
Metadata,single: Size:2.00GiB, Used:1.29GiB (64.56%)
/dev/sda3 2.00GiB
System,single: Size:32.00MiB, Used:16.00KiB (0.05%)
/dev/sda3 32.00MiB
Unallocated:
/dev/sda3 156.44GiB
Slack:
/dev/sda3 4.00GiB