GithubHelp home page GithubHelp logo

Comments (1)

jblotus avatar jblotus commented on May 28, 2024 1

I was running into disk space issues doing docker builds in colima. I tried the resize method in the FAQ but it only increase the size of the virtual disk not the partition allocated to docker data. I was able to achieve this by following bits of #398
I have no idea what I'm doing, but this seemed to fix.

colima stop
colima start --disk-500G
qemu-img resize ~/.lima/colima/diffdisk 500G
colima stop
colima start

Without the diffdisk resize the docker directory was stuck at 60GB for me, even though the virtual disk showed 500gb.

 % qemu-img info ~/.lima/colima/diffdisk
image: /Users/myname/.lima/colima/diffdisk
file format: raw
virtual size: 500 GiB (536870912000 bytes)
disk size: 55.2 GiB
Child node '/file':
    filename: /Users/myname/.lima/colima/diffdisk
    protocol type: file
    file length: 500 GiB (536870912000 bytes)
    disk size: 55.2 GiB


% qemu-img resize ~/.lima/colima/diffdisk 500G
WARNING: Image format was not specified for '/Users/myname/.lima/colima/diffdisk' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
Image resized.

After the resize it "seems" to work.

 colima ssh sudo su -
colima:~# df -h
Filesystem                Size      Used Available Use% Mounted on
devtmpfs                 10.0M         0     10.0M   0% /dev
shm                       3.9G         0      3.9G   0% /dev/shm
/dev/sda                297.4M    297.4M         0 100% /media/sda
tmpfs                     3.9G    555.6M      3.3G  14% /
tmpfs                     1.5G    732.0K      1.5G   0% /run
/dev/loop0               14.1M     14.1M         0 100% /.modloop
cgroup_root              10.0M         0     10.0M   0% /sys/fs/cgroup
/dev/disk/by-label/cidata
                         35.7M     35.7M         0 100% /mnt/lima-cidata
/dev/disk/by-label/data-volume
                        491.8G     54.8G    412.0G  12% /mnt/data
/dev/disk/by-label/data-volume
                        491.8G     54.8G    412.0G  12% /etc
/dev/disk/by-label/data-volume
                        491.8G     54.8G    412.0G  12% /home
/dev/disk/by-label/data-volume
                        491.8G     54.8G    412.0G  12% /root
/dev/disk/by-label/data-volume
                        491.8G     54.8G    412.0G  12% /tmp
/dev/disk/by-label/data-volume
                        491.8G     54.8G    412.0G  12% /usr/local
/dev/disk/by-label/data-volume
                        491.8G     54.8G    412.0G  12% /var/lib
mount1                    1.8T    457.0G      1.4T  25% /tmp/colima
vz-rosetta                1.8T    457.0G      1.4T  25% /mnt/lima-rosetta
mount0                    1.8T    457.0G      1.4T  25% /Users/myname
/dev/disk/by-label/data-volume
                        491.8G     54.8G    412.0G  12% /var/lib/docker
overlay                 491.8G     54.8G    412.0G  12% /var/lib/docker/overlay2/b6058d19852b31e55aaff637eba265684d13c880c5cf04d6c73e3a26de4e4d3b/merged
overlay                 491.8G     54.8G    412.0G  12% /var/lib/docker/overlay2/434c05112a3bb7510dcd5e638395fba67ce7502a9880952c7ef8e0753008c46f/merged
overlay                 491.8G     54.8G    412.0G  12% /var/lib/docker/overlay2/f6f612af35f9f0e3c3dae3be50dc4f9cf3e8496c13dba8057682bda3179bbb5e/merged
overlay                 491.8G     54.8G    412.0G  12% /var/lib/docker/overlay2/3b43c6592660b5ce1dbba75603b9485c59d9ac51decf654e3d214734c1ecf1e8/merged
overlay                 491.8G     54.8G    412.0G  12% /var/lib/docker/overlay2/7367a348454b7c2e1301b9f88606630cfee04d30b82f1d6411fb414bc5c41917/merged

from colima.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.