2

I have a 150GB /docker partition mounted on a RHEL 8 VM and I have ran this command as root and also with a local user that has sudo:

export TMPDIR=/docker

to make Podman change its default tmpdir. However, upon import of a 54GB .tar we run into this error below. What config setting am I missing?

$  podman import dockerfile.tar
Getting image source signatures
Copying blob b45265b317a7 done
Error: writing blob: adding layer with blob "sha256:b45265b317a7897670ff015b177bac7b9d5037b3cfb490d3567da959c7e2cf71": Error processing tar file(exit status 1): write /a65be6ac39ddadfec332b73d772c49d5f1b4fffbe7a3a419d00fd58fcb4bb757/layer.tar: no space left on device

Here are my partitions on this VM:

$ df -h
Filesystem                                  Size  Used Avail Use% Mounted on
devtmpfs                                    3.9G     0  3.9G   0% /dev
tmpfs                                       3.9G   84K  3.9G   1% /dev/shm
tmpfs                                       3.9G   51M  3.8G   2% /run
tmpfs                                       3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/mapper/rhel_rhel86--svr-root            38G  7.2G   31G  20% /
/dev/sda2                                   495M  276M  220M  56% /boot
/dev/mapper/rhel_rhel86--svr-var             33G  1.4G   32G   5% /var
/dev/mapper/rhel_rhel86--svr-tmp            4.7G   66M  4.6G   2% /tmp
/dev/mapper/rhel_rhel86--svr-home            43G  1.6G   42G   4% /home
/dev/mapper/rhel_rhel86--svr-var_log        4.7G  104M  4.6G   3% /var/log
/dev/sdb                                    147G   56G   84G  40% /docker
/dev/mapper/rhel_rhel86--svr-var_log_audit  9.4G  168M  9.2G   2% /var/log/audit
/dev/mapper/rhel_rhel86--svr-var_tmp        1.9G   47M  1.9G   3% /var/tmp
/dev/sda1                                   500M  5.9M  494M   2% /boot/efi
tmpfs                                       785M  8.0K  785M   1% /run/user/42
tmpfs                                       785M     0  785M   0% /run/user/1000

Heres part of /etc/containers/storage.conf

# Default Storage Driver, Must be set for proper operation.
driver = "overlay"

# Temporary storage location
runroot = "/docker"

# Primary Read/Write location of container storage
# When changing the graphroot location on an SELINUX system, you must
# ensure  the labeling matches the default locations labels with the
# following commands:
# semanage fcontext -a -e /var/lib/containers/storage /NEWSTORAGEPATH
# restorecon -R -v /NEWSTORAGEPATH
graphroot = "/docker"

This VM is running SELinux, so I ran the two commands and rebooted:

semanage fcontext -a -e /var/lib/containers/storage /docker
restorecon -R -v /docker

I was able to successfully import two other .tar files with Podman that were around 800MB, so I know Podman is working correctly. Any ideas why I'm running out of space even though the tmpdir is set to /docker? Thanks!

BMitch
  • 2,035
  • 9
  • 13
808mrb
  • 23
  • 1
  • 3
  • The 54G tar file is compressed. What is its size when uncompressed? – Rohit Gupta Dec 30 '22 at 20:18
  • @RohitGupta A tar file is, by definition, not compressed. Still, importing it may require lots of extra space depending on the implementation of the import feature. – Daniel B Dec 31 '22 at 18:04
  • @DanielB - I beg to differ. It does not have to be compressed, but it may be compressed. And if the file is that large, it is probably compressed. [Have a read](https://www.freecodecamp.org/news/how-to-compress-files-in-linux-with-tar-command/). Its just the first on in my Google search. – Rohit Gupta Jan 01 '23 at 11:59
  • A `.tar` file is not compressed, except is mislabeled. If compressed, it would be called `.tar.gz` (or similar). – Daniel B Jan 01 '23 at 12:10

1 Answers1

1

The output of your command has the answer. The file it is trying to write is "/a65be6ac39ddadfec332b73d772c49d5f1b4fffbe7a3a419d00fd58fcb4bb757/layer.tar"

The podman command is trying to write a 54GB file to the / partition which is only 38GB with 31GB available as indicated by your df -h command.

Even though you have /docker as the tmpdir and it has enough space, the / partition does not have enough space. Either increase the size of the / partition, or figure out a way to write the files to /docker since the tmpdir command isn't doing it and neither are the config settings you have in your storage.conf file

Dan H
  • 11
  • 1
  • I added a 100GB disk and expanded LVM so root is now 138GB. The docker import still fails though. $ podman import dockercfcs-12_22.tar Getting image source signatures Copying blob b45265b317a7 done Error: writing blob: adding layer with blob "sha256:b45265b317a7897670ff015b177bac7b9d5037b3cfb490d3567da959c7e2cf71": Error processing tar file(exit status 1): write /a65be6ac39ddadfec332b73d772c49d5f1b4fffbe7a3a419d00fd58fcb4bb757/layer.tar: no space left on device – 808mrb Jan 04 '23 at 16:04
  • Can we see the output of df -h again? Also how large is the tar file when it is untarred? I feel like it must be expanding to a larger size than what is available still. – Dan H Jan 05 '23 at 17:17