BTRFS critical (device dm-2): invalid dir item name len: 77
Hello,
I've been using btrfs on a Debian GNU/Linux system. After about 9 months, I encountered my first filesystem issue. It first appeared while doing an rm -rf, which resulted in a
rm: cannot remove […]: Directory not empty
a du -s on the directory gives an
BTRFS critical (device dm-2): invalid dir item name len: 77
I can mv directory around (which is good so it doesn't get in my way any more), but can't rm it.
How can I get id of it?
Philipp
Quoted 8 lines · Philipp Klaus Krause
Hello,
I've been using btrfs on a Debian GNU/Linux system. After about 9 months, I encountered my first filesystem issue. It first appeared while doing an rm -rf, which resulted in a
rm: cannot remove […]: Directory not empty
Quoted 8 lines
a du -s on the directory gives an
BTRFS critical (device dm-2): invalid dir item name len: 77
I can mv directory around (which is good so it doesn't get in my way any more), but can't rm it.
How can I get id of it?
In principle btrfsck (with the --repair option) should be able to fix it. Before running it with --repair, it's recommended to backup your data and run it first in readonly mode (no command line options passed to btrfsck) to confirm it detects the issue. Also try the latest version of btrfs-progs (currently v3.18.x), which has better chances of fixing it.
We had a few issues [1, 2] that lead to that issue, one fix is in kernel 3.18 and the other one is very recent, not yet in any kernel release:
Hope it helps.
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=a2cc11db245b9d8fbd4e3adbe2a1e7cf60473950
[2] https://patchwork.kernel.org/patch/5604671/
Quoted 3 lines
Philipp
Signature · 5 lines
Filipe David Manana, "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men."