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   修复该分区



  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值