rm ls 等操作出现structure needs cleaning(结构需要清理)解决方法

First you need to find files that cause this issue. this is very simple - in ls -l listing they will be shown like

????????? ? ? ? 1.7K Jun  8 13:49 filename

then, you need to run debugfs and delete inode of this file

debugfs -w /dev/sda5

-w says that partition will be opened in read-write mode.

In debugfs prompt you need to type

clri path/to/file

File path should be absolute for this partition. If your partition mounted to /mnt and file you need to delete is /mnt/folder/filename, you should use just folder/filename.

After deleting inodes of all broken files you can leave debugfs and run fsck on partition. It will automatically remove files without inodes and fix your partition.


1 执行debugfs -w /dev/sdb    (/dev/sdb出现 该情况文件所在的分区)

2 mount /dev/sdb /mnt/other  挂载到mnt/other 目录下

3 执行 clri path/file    移除损坏文件节点 注意path/file 值的是相对路径 而不是/mnt/other/****

4 退出 debugfs 执行fsck -y /mnt/other   修复该分区



你可能感兴趣的:(解惑,rm,ls,structure,needs,clea,结构需要清理)