The knowledge base / All cheat sheets
● Always in your toolkitAbout the project ↗

Docker host disk usage investigation cheat sheet

Investigate a full Docker host by comparing filesystem usage, daemon storage and container logging configuration.

Docker Engine on Linux; data-root location, storage driver and logging driver vary by installation.

Updated · Docker · 6 min read

CommandWhat it does
df -hInspect filesystem capacity
docker infoIdentify daemon storage configuration
docker system dfSummarize daemon disk usage
docker system df -vInspect detailed usage
docker inspect --format "{{.HostConfig.LogConfig.Type}}" appIdentify one container logging driver

Walkthrough

Use an authorized host and daemon context. These commands inspect state and do not prune images, delete volumes or modify Docker-managed files.

Step 1: Inspect filesystem capacity

df -h

Find the full filesystem and compare its mount point with the Docker data root. Filesystems can fill for reasons unrelated to Docker, so identify the affected mount first.

Step 2: Identify daemon storage configuration

docker info

Review Docker Root Dir, storage driver and logging driver for the daemon being queried. The client may target a remote daemon, so confirm the host and context.

Step 3: Summarize daemon disk usage

docker system df

Review image, container, volume and build cache estimates. Reclaimable is not a recommendation to delete data; the report is not a complete account of all host filesystem usage.

Step 4: Inspect detailed usage

docker system df -v

Compare image shared and unique sizes, container sizes and volume details. Avoid adding shared image sizes together as if every image consumed independent blocks.

Step 5: Identify one container logging driver

docker inspect --format "{{.HostConfig.LogConfig.Type}}" app

Replace app with the affected container name and inspect its logging driver. Driver configuration is not a measurement of log size, and changing or deleting managed files directly can disrupt Docker.

WORKED INCIDENT

Practical case: A Docker host filesystem is nearly full

Fictional teaching scenario; observations are examples, not captured production output.

Situation

A host alert reports low free space and an operator suspects container images.

Investigation sequence

1. Inspect filesystem capacity

df -h

Identify which filesystem is full before attributing usage to Docker.

2. Identify daemon storage configuration

docker info

Record the daemon data root and storage and logging driver information.

3. Summarize daemon disk usage

docker system df

Compare the daemon disk usage summary with actual filesystem capacity.

4. Inspect detailed usage

docker system df -v

Inspect detailed image and volume estimates without removing any data.

5. Identify one container logging driver

docker inspect --format "{{.HostConfig.LogConfig.Type}}" app

Check the affected container logging driver and ask the owner to review its logging policy.

Example findings

Illustrative findings: image usage is modest, while the operations team identifies unbounded logs on the full filesystem.

Interpret the findings

The independent log finding explains this example; docker system df alone does not account for every file consuming host storage.

Verify the outcome

After the service owner applies an approved logging and capacity fix, compare filesystem free space and application health over time.

Escalation handoff

Share sanitized filesystem usage, Docker storage details and relevant application logging observations with the host owner.

Primary references

Documented reference; examples above are teaching scenarios. Confirm behavior against your deployed version.