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

.local/share/rancher-desktop/lima/0/diffdisk file takes up 13.5GB #2285

Closed
dodalovic opened this issue May 27, 2022 · 9 comments
Closed

.local/share/rancher-desktop/lima/0/diffdisk file takes up 13.5GB #2285

dodalovic opened this issue May 27, 2022 · 9 comments
Labels
kind/bug Something isn't working triage/by-design The behavior is expected and not a bug

Comments

@dodalovic
Copy link

Actual Behavior

@ Linux PopOS!22.04

Steps to Reproduce

/

Result

image

Expected Behavior

should be less than 13.5 GB

Additional Information

No response

Rancher Desktop Version

1.3.0

Rancher Desktop K8s Version

1.23.6

Which container runtime are you using?

containerd (nerdctl)

What operating system are you using?

Other Linux

Operating System / Build Version

Pop OS 22.04

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

deb

Windows User Only

No response

@dodalovic dodalovic added the kind/bug Something isn't working label May 27, 2022
@jandubois
Copy link
Member

This is the persistent disk of the VM; it is where e.g. all images are stored that are either built locally, or pulled from dockerhub or any other registry. It is also where any PVC are being stored, if you use kubernetes and create persistent volume claims.

13GB sounds like a reasonable size, and the file can actually grow up to a limit of 100GB as you fetch/build more images. You have to perform a Factory Reset to throw away all the data, but the volume will grow again as you use it.

@jandubois jandubois added triage/wont-fix This will not be worked on triage/by-design The behavior is expected and not a bug and removed triage/wont-fix This will not be worked on labels May 27, 2022
@bruno-lopes
Copy link

Would it be possible to limit the size of the disk? For instance, 50 GB?

Also, after deleting the images, shouldn't it get smaller? I did this test, and the volume didn't get reduced.

@jandubois
Copy link
Member

Would it be possible to limit the size of the disk? For instance, 50 GB?

It is limited to 100GB by default. There is no way to change the default, but there is a workaround described in #1521 (comment)

Also, after deleting the images, shouldn't it get smaller? I did this test, and the volume didn't get reduced.

No, the file never gets smaller. The space that you freed up will be re-used, but there is no way to return unused space from inside the volume back to the host; you will have to delete and re-create it.

@jandubois
Copy link
Member

The workaround is for macOS, but should work on Linux too (after adjusting the path to the lima directory accordingly), but won't work on Windows.

@bruno-lopes
Copy link

Very thanks @jandubois ! Quick and very useful response. I'll try the workaround.

@aminmkhan
Copy link

Yes, the diffdisk continues to grow, and the problem seems to be that pruning docker images and containers has no effect on compacting the diffdisk used by VM.

There is a max size set by default of 100 GB, and only way right now to compact this VM is using Factory Reset option which will delete the Lima VM and re-create the disk.

The other option not available in UI is to override the default limit to less than 100 GB, as explained in #1521 (comment).

At creation time, the disk seems to be around ~250 MB, but will continue to grow with usage.

Proposed enhancements to UI can include:

  • There could be an option in UI to just also remove all existing images and containers, without deleting Lima VM
  • There could be an option in UI to configure disk size used by Lima VM
  • There could be an option in UI to compact the disk used by Lima VM

Relevant issues:
#1942
#1521
#171
#2398

@jandubois
Copy link
Member

Proposed enhancements to UI can include:

  • There could be an option in UI to just also remove all existing images and containers, without deleting Lima VM

I believe this is already possible using the "bulk delete" functionality in the "Images" tab. Click the checkbox on top to select all images, and then click the "Delete" button.

There may be some bugs/omissions about unnamed images, or images that have multiple names assigned to them. I know there are fixes for some of these problems in the coming 1.5.0 release.

  • There could be an option in UI to configure disk size used by Lima VM

Yes, but that would probably imply deleting and recreating the image (so like a factory reset, followed by a new start with a different size limit).

We should also have an option to move the while VM to a different volume.

  • There could be an option in UI to compact the disk used by Lima VM

This doesn't seem to be possible so far, except by creating a copy with a different size. But generally you will not have enough space to have another copy of the image at the time you want to compact it, so this does not really work. 😞

@jeremyguthrie
Copy link

any chance 'fstrim' can be added/invoked to the machine with 'diffdisk' attached?

@unknownzone96
Copy link

I believe this is already possible using the "bulk delete" functionality in the "Images" tab. Click the checkbox on top to select all images, and then click the "Delete" button.

Will this actually downsize the diffdisk?

Also, you do not actually know of the problem unless you get to the 100GB limit. Then you are stuck in the state where image manager is not starting/ready, so you cannot use the delete functionality in Images tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working triage/by-design The behavior is expected and not a bug
Projects
None yet
Development

No branches or pull requests

6 participants