etareduce

u/etareduce




r/btrfs•

After my troubles outlined in https://www.reddit.com/r/btrfs/comments/hv1vm1/1tb_free_space_gone_after_defrag_no_reflinks/g2m3sgf/?utm_source=reddit&utm_medium=web2x&context=3, I'm now having problems when powering up my machine. When staring the machine, it seems like the job to mount my btrfs /data array takes some 3 minutes, but then ultimately fails once I'm able to actually log into the (ubuntu) server.

At that point the logs say that:

BTRFS error (device sdf): open_ctree failed
Failed to mount /data.

but I'm then able to mount the array manually using:

sudo mount /data -o defaults,noatime,autodefrag,compress-force=zstd

with the following line in `/etc/fstab

23

r/btrfs•

My files where heavily fragmented so I ran an online sudo btrfs fi defrag -v -r /data/. While the defrag was happening, the free space was incrementally decreasing. After the defrag had finished, ~1TB of free space had vanished. So I tried sudo btrfs balance start /data/ (full balance), and also restarted some containers with references into /data while the rebalance was running. This did not seem to help, as only the ratio of total / used shrank.

Relevant info:

  • btrfs --version => btrfs-progs v5.4.1
  • Running sudo ncdu -x /data results in:
    Total disk usage:  35.9 TiB  Apparent size:  35.9 TiB  Items: 37728
    
  • $ sudo btrfs fi df /data/
    Data, RAID10
    
1019