g2p / bedup

Btrfs deduplication
http://pypi.python.org/pypi/bedup
GNU General Public License v2.0
322 stars 50 forks source link

"No space left on device" after bedup dedup #90

Open MarkoSchuetz opened 7 years ago

MarkoSchuetz commented 7 years ago

I ran

bedup dedup --size-cutoff=1024

After ~50h when "freed" was getting close to 2^32 (do not remember the exact number) there was a bus error. Trying to rerun the same command produced the same bus error. I could no longer log in. After reboot

btrfs fi df /

showed metadata full. Since btrfs balance start -dusage=0 / stopped with "No space left on device" I deleted snapshots and some files. Now

btrfs fi usage /               

Overall:
    Device size:                   1.80TiB
    Device allocated:              1.80TiB
    Device unallocated:            2.05MiB
    Device missing:                  0.00B
    Used:                          1.64TiB
    Free (estimated):             82.01GiB      (min: 82.01GiB)
    Data ratio:                       2.00
    Metadata ratio:                   2.00
    Global reserve:              512.00MiB      (used: 0.00B)

Data,RAID1: Size:909.98GiB, Used:827.97GiB
   /dev/sda3     909.98GiB
   /dev/sdb3     909.98GiB

Metadata,RAID1: Size:12.00GiB, Used:10.35GiB
   /dev/sda3      12.00GiB
   /dev/sdb3      12.00GiB

System,RAID1: Size:32.00MiB, Used:160.00KiB
   /dev/sda3      32.00MiB
   /dev/sdb3      32.00MiB

Unallocated:
   /dev/sda3       1.02MiB
   /dev/sdb3       1.02MiB

and while I can now log in and work I still get

btrfs balance start -dusage=0 /
ERROR: error during balancing '/': No space left on device

which is worrying.

fsvm88 commented 7 years ago

You may try to use this simple hack I described some time ago in a blog post: https://www.faskatech.net/posts/2016/11/27-Escaping-btrfs-bugs/ It boils down to shrinking and re-maxing the volume and then triggering a balance. Let me know if it works :-)