Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tar errors "No space left on device" on Ubuntu 24.04.1 LTS #11

Closed
qinidema opened this issue Nov 16, 2024 · 1 comment
Closed

Tar errors "No space left on device" on Ubuntu 24.04.1 LTS #11

qinidema opened this issue Nov 16, 2024 · 1 comment

Comments

@qinidema
Copy link

When running (at least) on Ubuntu 24.04.1 LTS I've got a following error:

tar: root.x86_64/usr/share/locale/bs/LC_MESSAGES/glib20.mo: Wrote only 9728 of 10240 bytes tar: root.x86_64/usr/share/locale/bs/LC_MESSAGES/libsecret.mo: Cannot write: No space left on device tar: root.x86_64/usr/share/locale/bs/LC_MESSAGES/shadow.mo: Cannot write: No space left on device
...etc for nearly all files in arch bootstrap archive.

That's because Ubuntu has TMPDIR environment variable unset, instead XDG_RUNTIME_DIR is set to "/run/user/$uid" (in my case uid was obviously 0), so tmpDir variable in the script got assigned "/run/user/0". In my case that was a mountpoint which was mounted like this:
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=201536k,nr_inodes=50384,mode=700,inode64)

(VPS with a 30GB drive and 2GB RAM). That amount of space was insufficient for bootstrap tar to unpack first at this line.
So to anyone encountered same error the quick fix was to set TMPDIR correctly before running the script:
export TMPDIR=/tmp
Then the script worked fine.

The more deep fix could be either unpacking to the mountpoint right away, without temp dir first, or taking more handling on the tmpDir script variable and the associated envitonment variables.

@wick3dr0se
Copy link
Owner

I think there is no absolutely safe way to determine the proper /tmp. I'm not enitrely sure it exist on all possible Linux systems and as you mentioned the environment variables aren't always an effective method. For now I just mentioned the issue and your comment about resolving the issue by exporting $TMPDIR in ~/.bash_profile or similar. I will close this as solved, thanks to your comment. Feel free to tag if you have any suggestions though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants