Bug 5508 - [ANCK 4.19] /var/lib/docker/目录df与du差距过大
Summary: [ANCK 4.19] /var/lib/docker/目录df与du差距过大
Status: RESOLVED WORKSFORME
Alias: None
Product: ANCK 4.19 Dev
Classification: ANCK
Component: block/storage (show other bugs) block/storage
Version: 4.19-026.x
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Jingbo Xu
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-12 20:27 UTC by xuxinsss
Modified: 2023-07-19 13:56 UTC (History)
4 users (show)

See Also:


Attachments
df命令显示的文件系统占用超过300G,但通过du命令进行统计只有约30G。 (2.97 MB, image/jpeg)
2023-06-12 20:27 UTC, xuxinsss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description xuxinsss inspur_group 2023-06-12 20:27:13 UTC
Created attachment 771 [details]
df命令显示的文件系统占用超过300G,但通过du命令进行统计只有约30G。

Description of problem:
Openstack云平台计算节点磁盘使用率过高,超过90%。但登录该节点后,使用df du命令分别查询/var/lib/docker/目录下的磁盘占用,查询数据差异较大。Openstack平台计算节点服务使用k8s容器化部署。重启节点后,磁盘分区使用率恢复正常。
迁移部分虚拟机后,df显示部分空间释放。

临时解决方法:
1.重启节点。(可解决)
2.停掉docker服务,停掉本节点所有虚拟机进程,卸载文件系统后重新挂载。(可解决)
3.重启节点上的服务容器。(不能解决)

Version-Release number of selected component (if applicable):


How reproducible:
无

Steps to Reproduce:
无

Actual results:


Expected results:


Additional info:
Comment 1 Jingbo Xu alibaba_cloud_group 2023-06-13 09:57:28 UTC
lsof 2>/dev/null | grep -i deleted | awk 'BEGIN{sum=0}{sum += $(NF-3)}END{print sum}‘

可能是 orphan file 导致的,可以使用上述脚本检查系统中 orphan file 的大小
Comment 2 Joseph Qi alibaba_cloud_group 2023-07-19 13:56:26 UTC
Please check the deleted files.