| Summary: | [RFE] Docker should provide a way to look at storage layout/usage | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Eric Jones <erjones> |
| Component: | docker | Assignee: | Vivek Goyal <vgoyal> |
| Status: | CLOSED DUPLICATE | QA Contact: | atomic-bugs <atomic-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.4 | CC: | dornelas, dwalsh, erjones, jnordell, loberman, lsm5, lsu, smahajan |
| Target Milestone: | rc | Keywords: | Extras, FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-11-14 23:28:43 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 1186913 | ||
|
Description
Eric Jones
2016-09-08 21:52:34 UTC
The problem here is there are multiple places where docker currently uses storage, especially when using the devicemapper back end. devicemapper storage and storage on /var/lib/docker, and any volumes that are being used inside of a container I think the daemon has an idea of storage for devicemapper, It does not keep track of the others. If we move to OverlayFS the storage becomes more concentrated in /var/lib/docker. Docker "info" already has lot of information. It provides number of images and containers. To reclaim space, user can delete containers and images which are not in use any more. (Similar to deleting files on filesystem for reclaiming space). This should free up space used by images and container and associated metadata as well. (logs etc). I think only remaining piece will be volume. For that either remove containers along with their volumes (using option -v) or use "docker volume <ls/rm>" commands to list and remove volume to free up more space. If this is not good enough, I think we will require more precise description of requirement. There could also be huge logs in /var/lib/docker, if you have not changed the default logger to journald. Sure, but container removal should remove those logfile as well? sadly yes. The difficult part is there is no tool currently that can look at how much space each container is using. you might want to look at this proposal being discussed upstream. https://github.com/docker/docker/issues/22871 Shishir Look at following docker merge which introduce new commands for managing space usage of docker. Is this good? This will show up in docker-1.13 though. https://github.com/docker/docker/pull/26108 Definitely looks like the sort of thing I was looking for! Thanks! Fixed in docker-1.13 Closing as this is resolved in docker-latest 1.13.1 with new 'docker system df' command. *** This bug has been marked as a duplicate of bug 1328566 *** |