最近,查看磁盘空间时,执行 df -h 时,命令 hang 住了,一直没有反应!

现象如下:

这种问题,大概率是由于 mount 的目录被删除了,但是没有提前执行 umount 操作,因此报错!

解决方案:

查看 /etc/fstab 文件中是否有 mount 相关的目录,使用 umount -l 命令卸载无效挂载目录。

[root@mes-rac01 soft]# umount -l /backup
 
##umount -l解释
-l, --lazy              detach the filesystem now, and cleanup all later

测试df -h,已恢复正常!

文章来源: Lucifer三思而后行
https://www.modb.pro/db/132380
最后修改:2021 年 11 月 14 日
如果觉得我的文章对你有用,请随意赞赏