>> My system is or seems to be running out of disk space but I >> can't find out how or why. [ ... ] >> Filesystem Size Used Avail Use% Mounted on >> /dev/sda3 28G 26G 2.1G 93% / [ ... ] > So from chunk level, your fs is already full. And balance > won't success since there is no unallocated space at all.
To add to this, 28GiB is a bit too small for Btrfs, because at that point chunk size is 1GiB. I have the habit of sizing partitions to an exact number of GiB, and that means that most of 1GiB will never be used by Btrfs because there is a small amount of space allocated that is smaller than 1GiB and thus there will be eventually just less than 1GiB unallocated. Unfortunately the chunk size is not manually settable. Example here from 'btrfs fi usage': Overall: Device size: 88.00GiB Device allocated: 86.06GiB Device unallocated: 1.94GiB Device missing: 0.00B Used: 80.11GiB Free (estimated): 6.26GiB (min: 5.30GiB) That means that I should 'btrfs balance' now, because of the 1.94GiB "unallocated", 0.94GiB will never be allocated, and that leaves just 1GiB "unallocated" which is the minimum for running 'btrfs balance'. I have just done so and this is the result: Overall: Device size: 88.00GiB Device allocated: 82.03GiB Device unallocated: 5.97GiB Device missing: 0.00B Used: 80.11GiB Free (estimated): 6.26GiB (min: 3.28GiB) At some point I had decided to use 'mixedbg' allocation to reduce this problem and hopefully improve locality, but that means that metadata and data need to have the same profile, and I really want metadata to be 'dup' because of checksumming, and I don't want data to be 'dup' too. > [ ... ] To proceed, add a larger device to current fs, and do > a balance or just delete the 28G partition then btrfs will > handle the rest well. Usually for this I use a USB stick, with a 1-3GiB partition plus a bit extra because of that extra bit of space. https://btrfs.wiki.kernel.org/index.php/FAQ#How_much_free_space_do_I_have.3F https://btrfs.wiki.kernel.org/index.php/FAQ#Help.21_Btrfs_claims_I.27m_out_of_space.2C_but_it_looks_like_I_should_have_lots_left.21 marc.merlins.org/perso/btrfs/post_2014-05-04_Fixing-Btrfs-Filesystem-Full-Problems.html Unfortunately if it is a single device volume and metadata is 'dup' to remove the extra temporary device one has first to convert the metadata to 'single' and then back to 'dup' after removal. There are also some additional reasons why space used (rather than allocated) may be larger than expected, in special but not wholly infrequent cases. My impression is that the Btrfs design trades space for performance and reliability. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html