0

I'm playing with debugfs. I first created a file:

debugfs -w /dev/vda1
> write /etc/hosts /a/b/c/d

And the file system is broken:

[root@linux2 /]# ls -l
ls: cannot access /a/b/c/d: No such file or directory
total 8388724
-??????????   ? ?        ?             ?            ? /a/b/c/d

The system looks broken to me too:

[978471.090291] EXT4-fs error (device vda1): __ext4_new_inode:989: comm SystemLogFlush: failed to insert inode 9190949: doubly allocated?
[978475.765474] EXT4-fs (vda1): pa ffff93f4732c4000: logic 2133, phys. 15753237, len 1963
[978475.767163] EXT4-fs error (device vda1): ext4_mb_release_inode_pa:3803: group 480, free 1962, pa_free 1960
[978475.814801] JBD2: Spotted dirty metadata buffer (dev = vda1, blocknr = 0). There's a risk of filesystem corruption in case of system crash.

Since debugfs does not support removing files by inode, how can I remove this file?

What's wrong here?

1 Answer 1

1

The simplest option to clean things up is to check the file system:

e2fsck -f /dev/vda1

What’s wrong is that you’ve ended up with a directory entry containing forward slashes, which shouldn’t happen. Current versions of debugfs don’t allow this, it seems your version does.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .