Closed aij closed 2 years ago
Full dmesg output is here: https://gist.github.com/aij/2ca8ae4ba2c4a490330a04542cdfdd9a
[2146501.030987] BTRFS: error (device sda1) in btrfs_finish_ordered_io:2736: errno=-28 No space left
[2146501.031090] BTRFS info (device sda1): forced readonly
btrfs can become read only if you have no unallocated space available and you need to write metadata. This is an upstream "feature" and not really nixos specific. See https://btrfs.wiki.kernel.org/index.php/FAQ#Help.21_I_ran_out_of_disk_space.21 for advice. The fine people on #btrfs on libera.chat may also help you.
I can try to give a few hints, but no guarantees, your computer may take fire :)
btrfs device add /dev/foo
. To remove it when you know that even removing the device there would still be unallocated space, btrfs device remove /dev/foo
. If your disk is full, do that with a usb drive. (it's a bit risky though).btrfs balance -dusage=XXX start /mnt
with XXX=5 then increasing this value (it's a percentage) until there are several GB of unallocated space.Feel free to continue posting on this thread but I'm closing the issue as it is not nixos specific.
Describe the bug
After accidentally filling up a btrfs filesystem it was forced readonly with a warning in dmesg:
Steps To Reproduce
I'm not yet sure whether this is reproducible, but given that it's a filesystem error I figured it may be worth trying to debug the relevant code regardless.
Steps to reproduce the behavior:
mkfs.btrfs -L scratch /dev/sd[a-l]1
btrfs device remove
andbtrfs replace
NFS export was via
Expected behavior
Should be able to delete files to free up space.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
This seems likely an upstream kernel bug, but https://bugzilla.kernel.org/ specifically says "Please use your distribution's bug tracking tools"
The name "scratch" is accurate... I do not mind losing data on this FS, but would like to help improve btrfs stability for other uses if I can. :)
A bit more data:
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.(Probably less useful because this is a nixops target)