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

toolbox: yum install fails: At least 47MB more space needed on the / filesystem. #3880

Closed
sniederm opened this issue Mar 14, 2019 · 8 comments

Comments

@sniederm
Copy link

I was trying to install additional packages into Minikube, but that seems not to work properly.
What is the preferred way to install additional tools in Minikube?

The exact command-lines used so that we can replicate the issue:

toolbox
yum install vim

The full output of the command that failed:

Error Summary

Disk Requirements:
At least 47MB more space needed on the / filesystem.

But there is enough space available!

Which operating system version was used:

MacOSX Mojave

There is a closed ticket on this but I'm not sure whether it was fixed or dropped:
#2889

If dropped, as a developer tool it would be very handy to support to install additional tools inside Minikube and re-enable such a feature. This would simplify things a lot in our development cycles.

BTW: Thanks for your great work!

@tstromberg tstromberg changed the title Cannot install additional packages inside Minikube toolbox: yum install fails: At least 47MB more space needed on the / filesystem. Mar 14, 2019
@tstromberg
Copy link
Contributor

tstromberg commented Mar 14, 2019

I believe the root cause here is how the filesystem shows up in the toolbox jail. Looking at https://redmine.ixsystems.com/issues/3668 - it may be possible to work around this by adding this to /etc/yum.conf:

diskspacecheck=0

Do you mind checking if that does the trick for you? If so, we just have to figure out how to get the toolbox updated to always include that - or of course, fix the underlying disk size plumbing issue.

@sniederm
Copy link
Author

sniederm commented Mar 14, 2019

Thanks Thomas, you pointed me into the right direction!

I added this line to /etc/dnf/dnf.conf:
diskspacecheck=0

And it works fine now.
Yum seems to be deprecated.

@afbjorklund
Copy link
Collaborator

What is the preferred way to install additional tools in Minikube?

That is a very good question, so far the answer has been Buildroot

@sniederm
Copy link
Author

What is the preferred way to install additional tools in Minikube?
That is a very good question, so far the answer has been Buildroot

Today I played a bit with toolbox inside Minikube and everything worked like a charm so far (except that space problem mentioned above). So, the preferred way probably could be toolbox?

@afbjorklund
Copy link
Collaborator

We could hack this into toolbox script, after touching the os-release*. Seems it doesn't like the rootfs ?

This should probably check for both fedora and rootfs, before changing the DNF (yum 4) configuration.

At least if we ever want to upstream the rootfs fix back to https://github.com/coreos/toolbox again


Side note: with the "disk" space check disabled, it will probably kill the VM if you install something big.

In minishift they "solved" this with a warning, and a: Are you sure you want to continue? [y/N]

https://github.com/minishift/minishift-centos-iso/blob/master/scripts/yum-wrapper

The better fix would be to symlink something over to the actual disk, I think they used that for /opt

@afbjorklund
Copy link
Collaborator

Linking the entire /var/lib/toolbox seems to work fine.

$ sudo mkdir /mnt/sda1/var/lib/toolbox
$ sudo ln -s /mnt/sda1/var/lib/toolbox /var/lib/toolbox

$ toolbox
Downloading sha256:01eb078129a [===============================]   90 MB / 90 MB
successfully removed aci for image: "sha512-319c511eb1e6ad373f65e9347a0157fe4f88e6e41d836ddd181aed24301e8f69"
rm: 1 image(s) successfully removed
Spawning container docker-fedora-29 on /mnt/sda1/var/lib/toolbox/docker-fedora-29.
Press ^] three times within 1s to kill container.
[root@minikube ~]# df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        17G  2.1G   14G  14% /

Should also help the RAM situation, with toolbox installed.

$ sudo du -hs /var/lib/toolbox/docker-fedora-29
288M	/var/lib/toolbox/docker-fedora-29

@afbjorklund
Copy link
Collaborator

Even a simple dnf check-update downloads and unpacks lots of data:

[root@minikube ~]# dnf check-update
Fedora Modular 29 - x86_64                   384 kB/s | 1.5 MB     00:03    
Fedora Modular 29 - x86_64 - Updates         526 kB/s | 2.1 MB     00:04    
Fedora 29 - x86_64 - Updates                 1.9 MB/s |  25 MB     00:13    
Fedora 29 - x86_64                           2.6 MB/s |  62 MB     00:23    
486M	/var/lib/toolbox/docker-fedora-29

So that's another 200M, without even installing any extra tools in the toolbox.

@kougazhang
Copy link

I meet the problem on Macos too.

Increase Disk image size and restart Docker can fix it
image

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

4 participants