如何将码头量的未使用空间释放到系统中?

发布于 2025-02-12 19:31:01 字数 123 浏览 1 评论 0原文

我的服务器处于0%的可用空间。我刚刚在一个积极运行的容器中删除了其中一个Docker卷中的100GB数据。

我如何释放空间并将其释放到主机系统,以使我不在0%。我需要停止Docker容器释放它吗?

谢谢!

My server is at 0% free space. I just deleted 100gb of data in one of my docker volumes in an actively running container.

How do I free up the space and release it to the host system so that I am not at 0%. Do I need to stop the docker container to release it?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

巾帼英雄 2025-02-19 19:31:01

如果容器仍在运行,并且删除文件没有显示磁盘使用情况的任何下降,则容器内部的过程使这些文件句柄打开是很好的。操作系统不会释放基础文件并收回空间,直到所有带有打开文件句柄的进程关闭这些文件句柄或流程退出。简而言之,您可能需要重新启动容器。

If the container is still running, and deleting files doesn't show any drop in disk usage, odds are good that the process inside your container has those file handles open. The OS won't release the underlying file and reclaim the space until all processes with open file handles close those file handles, or the process exits. In short, you likely need to restart the container.

隱形的亼 2025-02-19 19:31:01

您需要做的是通过使用:

Docker System Prune https://docs.docker.com/config/pruning/

这将删除未使用的容器,干净的图像等。

what you need to do is clean your docker system by using:

docker system prune : https://docs.docker.com/config/pruning/

This will remove unused containers, clean images and more.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文