Ubuntu出现Structure needs cleaning处理方法

在编译嵌入式Linux buildroot的过程中,电脑突然掉电,重启电脑后,在编译kernel时出现了“Structure needs cleaning”相关提示,于是想clean后再编译,发现clean时也会有相关提示:

guochongxin@slam:~/rk3588-sdk/kernel-5.10$ make clean
rm: cannot remove './fs/kernfs/built-in.a': Structure needs cleaning
rm: cannot remove './fs/kernfs/.modules.order.cmd': Structure needs cleaning
rm: cannot remove './fs/kernfs/inode.o': Structure needs cleaning
rm: cannot remove './fs/kernfs/modules.order': Structure needs cleaning
rm: cannot remove './fs/kernfs/symlink.o': Structure needs cleaning
rm: cannot remove './fs/kernfs/.inode.o.cmd': Structure needs cleaning
rm: cannot remove './fs/kernfs/.symlink.o.cmd': Structure needs cleaning
rm: cannot remove './fs/kernfs/dir.o': Structure needs cleaning
rm: cannot remove './fs/kernfs/file.o': Structure needs cleaning
rm: cannot remove './fs/kernfs/mount.o': Structure needs cleaning
rm: cannot remove './fs/kernfs/.file.o.cmd': Structure needs cleaning
rm: cannot remove './fs/kernfs/.dir.o.cmd': Structure needs cleaning
rm: cannot remove './fs/kernfs/.mount.o.cmd': Structure needs cleaning
rm: cannot remove './fs/kernfs/.built-in.a.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/uptime.o': Structure needs cleaning
rm: cannot remove './fs/proc/built-in.a': Structure needs cleaning
rm: cannot remove './fs/proc/meminfo.o': Structure needs cleaning
rm: cannot remove './fs/proc/proc_sysctl.o': Structure needs cleaning
rm: cannot remove './fs/proc/devices.o': Structure needs cleaning
rm: cannot remove './fs/proc/.softirqs.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/task_mmu.o': Structure needs cleaning
rm: cannot remove './fs/proc/consoles.o': Structure needs cleaning
rm: cannot remove './fs/proc/.modules.order.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.array.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.root.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/cmdline.o': Structure needs cleaning
rm: cannot remove './fs/proc/stat.o': Structure needs cleaning
rm: cannot remove './fs/proc/inode.o': Structure needs cleaning
rm: cannot remove './fs/proc/modules.order': Structure needs cleaning
rm: cannot remove './fs/proc/.base.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.generic.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.stat.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.kmsg.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.inode.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/proc_tty.o': Structure needs cleaning
rm: cannot remove './fs/proc/self.o': Structure needs cleaning
rm: cannot remove './fs/proc/.devices.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.interrupts.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/proc_net.o': Structure needs cleaning
rm: cannot remove './fs/proc/.consoles.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/cpuinfo.o': Structure needs cleaning
rm: cannot remove './fs/proc/.meminfo.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/base.o': Structure needs cleaning
rm: cannot remove './fs/proc/interrupts.o': Structure needs cleaning
rm: cannot remove './fs/proc/.proc_sysctl.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.proc_net.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/generic.o': Structure needs cleaning
rm: cannot remove './fs/proc/.self.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.proc_tty.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.page.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.fd.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.util.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/softirqs.o': Structure needs cleaning
rm: cannot remove './fs/proc/.cmdline.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/loadavg.o': Structure needs cleaning
rm: cannot remove './fs/proc/.version.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.task_mmu.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/fd.o': Structure needs cleaning
rm: cannot remove './fs/proc/page.o': Structure needs cleaning
rm: cannot remove './fs/proc/array.o': Structure needs cleaning
rm: cannot remove './fs/proc/.loadavg.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/kmsg.o': Structure needs cleaning
rm: cannot remove './fs/proc/version.o': Structure needs cleaning
rm: cannot remove './fs/proc/root.o': Structure needs cleaning
rm: cannot remove './fs/proc/.cpuinfo.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.built-in.a.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/thread_self.o': Structure needs cleaning
rm: cannot remove './fs/proc/.uptime.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.thread_self.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/.namespaces.o.cmd': Structure needs cleaning
rm: cannot remove './fs/proc/namespaces.o': Structure needs cleaning
rm: cannot remove './fs/proc/util.o': Structure needs cleaning
rm: cannot remove './fs/sysfs/built-in.a': Structure needs cleaning
rm: cannot remove './fs/sysfs/.modules.order.cmd': Structure needs cleaning
rm: cannot remove './fs/sysfs/modules.order': Structure needs cleaning
rm: cannot remove './fs/sysfs/symlink.o': Structure needs cleaning
rm: cannot remove './fs/sysfs/.symlink.o.cmd': Structure needs cleaning
rm: cannot remove './fs/sysfs/dir.o': Structure needs cleaning
rm: cannot remove './fs/sysfs/file.o': Structure needs cleaning
rm: cannot remove './fs/sysfs/mount.o': Structure needs cleaning
rm: cannot remove './fs/sysfs/.file.o.cmd': Structure needs cleaning
rm: cannot remove './fs/sysfs/.group.o.cmd': Structure needs cleaning
rm: cannot remove './fs/sysfs/.dir.o.cmd': Structure needs cleaning
rm: cannot remove './fs/sysfs/.mount.o.cmd': Structure needs cleaning
rm: cannot remove './fs/sysfs/group.o': Structure needs cleaning
rm: cannot remove './fs/sysfs/.built-in.a.cmd': Structure needs cleaning
rm: cannot remove './fs/quota/built-in.a': Structure needs cleaning
rm: cannot remove './fs/quota/.modules.order.cmd': Structure needs cleaning
rm: cannot remove './fs/quota/modules.order': Structure needs cleaning
rm: cannot remove './fs/quota/.built-in.a.cmd': Structure needs cleaning
rm: cannot remove './fs/devpts/built-in.a': Structure needs cleaning
rm: cannot remove './fs/devpts/.modules.order.cmd': Structure needs cleaning
rm: cannot remove './fs/devpts/inode.o': Structure needs cleaning
rm: cannot remove './fs/devpts/modules.order': Structure needs cleaning
rm: cannot remove './fs/devpts/.inode.o.cmd': Structure needs cleaning
rm: cannot remove './fs/devpts/.built-in.a.cmd': Structure needs cleaning
rm: cannot remove './kernel/power/.main.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/power/built-in.a': Structure needs cleaning
rm: cannot remove './kernel/power/main.o': Structure needs cleaning
rm: cannot remove './kernel/power/console.o': Structure needs cleaning
rm: cannot remove './kernel/power/.modules.order.cmd': Structure needs cleaning
rm: cannot remove './kernel/power/modules.order': Structure needs cleaning
rm: cannot remove './kernel/power/energy_model.o': Structure needs cleaning
rm: cannot remove './kernel/power/.process.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/power/qos.o': Structure needs cleaning
rm: cannot remove './kernel/power/process.o': Structure needs cleaning
rm: cannot remove './kernel/power/.qos.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/power/.wakeup_reason.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/power/.console.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/power/.suspend.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/power/wakeup_reason.o': Structure needs cleaning
rm: cannot remove './kernel/power/poweroff.o': Structure needs cleaning
rm: cannot remove './kernel/power/.poweroff.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/power/.energy_model.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/power/suspend.o': Structure needs cleaning
rm: cannot remove './kernel/power/.built-in.a.cmd': Structure needs cleaning
rm: cannot remove './kernel/printk/printk_safe.o': Structure needs cleaning
rm: cannot remove './kernel/printk/built-in.a': Structure needs cleaning
rm: cannot remove './kernel/printk/.modules.order.cmd': Structure needs cleaning
rm: cannot remove './kernel/printk/printk.o': Structure needs cleaning
rm: cannot remove './kernel/printk/modules.order': Structure needs cleaning
rm: cannot remove './kernel/printk/printk_ringbuffer.o': Structure needs cleaning
rm: cannot remove './kernel/printk/.printk.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/printk/.built-in.a.cmd': Structure needs cleaning
rm: cannot remove './kernel/printk/.printk_safe.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/printk/.printk_ringbuffer.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/locking/osq_lock.o': Structure needs cleaning
rm: cannot remove './kernel/locking/built-in.a': Structure needs cleaning
rm: cannot remove './kernel/locking/.rtmutex.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/locking/.modules.order.cmd': Structure needs cleaning
rm: cannot remove './kernel/locking/spinlock.o': Structure needs cleaning
rm: cannot remove './kernel/locking/modules.order': Structure needs cleaning
rm: cannot remove './kernel/locking/.spinlock.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/locking/.percpu-rwsem.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/locking/rtmutex.o': Structure needs cleaning
rm: cannot remove './kernel/locking/.semaphore.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/locking/semaphore.o': Structure needs cleaning
rm: cannot remove './kernel/locking/mutex.o': Structure needs cleaning
rm: cannot remove './kernel/locking/percpu-rwsem.o': Structure needs cleaning
rm: cannot remove './kernel/locking/.qrwlock.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/locking/.mutex.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/locking/qspinlock.o': Structure needs cleaning
rm: cannot remove './kernel/locking/.osq_lock.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/locking/rwsem.o': Structure needs cleaning
rm: cannot remove './kernel/locking/.built-in.a.cmd': Structure needs cleaning
rm: cannot remove './kernel/locking/.rwsem.o.cmd': Structure needs cleaning
rm: cannot remove './kernel/locking/qrwlock.o': Structure needs cleaning
rm: cannot remove './kernel/locking/.qspinlock.o.cmd': Structure needs cleaning
rm: cannot remove './ipc/built-in.a': Structure needs cleaning
rm: cannot remove './ipc/.modules.order.cmd': Structure needs cleaning
rm: cannot remove './ipc/.ipc_sysctl.o.cmd': Structure needs cleaning
rm: cannot remove './ipc/.syscall.o.cmd': Structure needs cleaning
rm: cannot remove './ipc/modules.order': Structure needs cleaning
rm: cannot remove './ipc/sem.o': Structure needs cleaning
rm: cannot remove './ipc/msg.o': Structure needs cleaning
rm: cannot remove './ipc/.compat.o.cmd': Structure needs cleaning
rm: cannot remove './ipc/ipc_sysctl.o': Structure needs cleaning
rm: cannot remove './ipc/.msg.o.cmd': Structure needs cleaning
rm: cannot remove './ipc/.msgutil.o.cmd': Structure needs cleaning
rm: cannot remove './ipc/.namespace.o.cmd': Structure needs cleaning
rm: cannot remove './ipc/.util.o.cmd': Structure needs cleaning
rm: cannot remove './ipc/.sem.o.cmd': Structure needs cleaning
rm: cannot remove './ipc/msgutil.o': Structure needs cleaning
rm: cannot remove './ipc/.built-in.a.cmd': Structure needs cleaning
rm: cannot remove './ipc/shm.o': Structure needs cleaning
rm: cannot remove './ipc/syscall.o': Structure needs cleaning
rm: cannot remove './ipc/namespace.o': Structure needs cleaning
rm: cannot remove './ipc/compat.o': Structure needs cleaning
rm: cannot remove './ipc/.shm.o.cmd': Structure needs cleaning
rm: cannot remove './ipc/util.o': Structure needs cleaning
make: *** [Makefile:1940: clean] Error 123

很明显,磁盘被破坏了,于是将上面$HOME目录umount后,再使用fsck命令检测修复下磁盘(假如$HOME目录为/dev/sdb磁盘挂载后目录):

sudo umount ~/
sudo fsck.ext4 -y /dev/sdb

执行上述命令后,会检测到异常,并对所有提示回复yes(上述-y参数),有类似如下打印输出:

guochongxin@slam:~$ sudo fsck.ext4 -y /dev/sdc
e2fsck 1.44.1 (24-Mar-2018)
/dev/sdc contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Entry 'semaphore.o' in /rk3588-sdk/kernel-5.10/kernel/locking (10632763) has deleted/unused inode 10669474.  Clear? yes

Entry 'mutex.o' in /rk3588-sdk/kernel-5.10/kernel/locking (10632763) has deleted/unused inode 10669468.  Clear? yes

Entry '.mutex.o.cmd' in /rk3588-sdk/kernel-5.10/kernel/locking (10632763) has deleted/unused inode 10669471.  Clear? yes

Entry 'percpu-rwsem.o' in /rk3588-sdk/kernel-5.10/kernel/locking (10632763) has deleted/unused inode 10669503.  Clear? yes

Entry '.semaphore.o.cmd' in /rk3588-sdk/kernel-5.10/kernel/locking (10632763) has deleted/unused inode 10669475.  Clear? yes

Entry 'rwsem.o' in /rk3588-sdk/kernel-5.10/kernel/locking (10632763) has deleted/unused inode 10669486.  Clear? yes

Entry '.rwsem.o.cmd' in /rk3588-sdk/kernel-5.10/kernel/locking (10632763) has deleted/unused inode 10669487.  Clear? yes

Entry 'modules.order' in /rk3588-sdk/kernel-5.10/kernel/locking (10632763) has deleted/unused inode 10669502.  Clear? yes

Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sdb: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdb: 2208648/14417920 files (0.1% non-contiguous), 34787406/57671680 blocks

上述执行修改完成后,重新挂载后再次编译就正常了。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

stxinu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值