Software⏱️ 4 min read📅 2026-06-11

How to Fix: Podman error "no space left on device" even though there is space and tmpdir is set

Podman error no space left on device despite tmpdir set

Quick Answer: Check if the /docker partition has enough free space and ensure that the tmpdir is correctly set to a non-full disk.

The error 'no space left on device' when importing a tar file using Podman is frustrating because it suggests that there isn't enough free space on the disk, even though you've set the tmpdir to /docker and have plenty of available storage. However, this error can occur due to various reasons such as a misconfigured tmpdir or an issue with the disk's file system.

To resolve this issue, we'll explore the root causes of the problem and provide two primary fix methods: setting the correct tmpdir path and checking for any issues with the disk's file system.

💡 Why You Are Getting This Error

  • The first main reason why this error happens is that the tmpdir set by Podman may not be correct or accessible. When you run `export TMPDIR=/docker`, it sets the environment variable, but if the `/docker` directory doesn't exist or isn't writable, Podman won't use it as expected. This can lead to the 'no space left on device' error when trying to import a tar file.
  • Another alternative reason for this issue is that there might be an issue with the disk's file system, such as a full /dev/shm or /run directory. In this case, Podman may try to write temporary files to these directories, which can lead to the 'no space left on device' error.

🔧 Proven Troubleshooting Steps

Setting the correct tmpdir path

  1. Step 1: Check if the `/docker` directory exists and is writable. If it doesn't exist, create it using `mkdir -p /docker`. If it's not writable, change its permissions to make it writable using `chmod -R a+w /docker`.
  2. Step 2: Verify that the tmpdir environment variable is set correctly by running `echo $TMPDIR`. It should print `/docker`. If it doesn't, update the environment variable using `export TMPDIR=/docker`.
  3. Step 3: Test Podman's behavior by importing a small tar file to ensure that the correct tmpdir path is being used.

Checking for issues with the disk's file system

  1. Step 1: Check the available free space on the disk where `/docker` is mounted using `df -h`. Make sure there's enough free space to accommodate the tar file being imported.
  2. Step 2: Verify that the /dev/shm and /run directories have enough free space. You can do this by running `df -h` and looking for the corresponding directories. If they're full, you may need to delete some files or increase their sizes using `fuser -m` and `fsck`.
  3. Step 3: Run `tmpfsd --help` to check if there are any issues with the tmpfs file system. This command can help identify problems with the /dev/shm and /run directories.

✨ Wrapping Up

To resolve the 'no space left on device' error when importing a tar file using Podman, ensure that the tmpdir path is correct and accessible. Check for any issues with the disk's file system, such as full /dev/shm or /run directories. By following these steps, you should be able to import your tar file successfully.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions