-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Make kvm2 driver disk images smaller #3155
Comments
When running Virtualbox (5.1), the When running libvirt (kvm2), the |
Running Possibly the situation can be helped by using https://dustymabe.com/2013/06/11/recover-space-from-vm-disk-images-by-using-discardfstrim/ $ sudo fstrim /mnt/vda1
fstrim: /mnt/vda1: the discard operation is not supported |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
After the removal of the swap partition, the bloat is smaller but it is still there: $ qemu-img convert -f raw minikube.rawdisk -O raw minikube.convert
$ du -hs minikube.rawdisk minikube.convert
3.0G minikube.rawdisk
1.8G minikube.convert /remove-lifecycle rotten |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
FEATURE REQUEST
Please provide the following details:
Environment:
minikube version
):v0.28.2
Ubuntu 16.04
cat ~/.minikube/machines/minikube/config.json | grep DriverName
):kvm2
cat ~/.minikube/machines/minikube/config.json | grep -i ISO
orminikube ssh cat /etc/VERSION
):v0.28.1
What happened:
The disk image for the minikube machine is over 5G in size, even though "only" half of that is used.
What you expected to happen:
The size of the disk image should match the contents, like it seem to be doing closer for virtualbox.
How to reproduce it (as minimally and precisely as possible):
minikube start --vm-driver kvm2
Output of
minikube logs
(if applicable):Anything else do we need to know:
It could be the swap partition that is bloating the disk image, it could also be temporary files.
The workaround is to "compact" the disk image, by stopping it and using
qemu-img convert
The text was updated successfully, but these errors were encountered: