coreos / coreos-xhyve

Container Linux running on xhyve hypervisor
Apache License 2.0
330 stars 42 forks source link

No space left on device with docker #14

Closed Hermanverschooten closed 8 years ago

Hermanverschooten commented 9 years ago

When I try to run one of my docker-composed containers I quickly run out of space. I see the disk is currently only 512Mb, is there a way to increase this?

AntonioMeireles commented 9 years ago

@Hermanverschooten (long story short) go along something like ...

should work...

rimusz commented 9 years ago

@AntonioMeireles I already tried that way, coreos just crashes on the boot

AntonioMeireles commented 9 years ago

@rimusz i didn't have too much time to look (busy atm) but, at sight, i suspect that masking the lvm services may do the trick ... (lvm2-{lvmetad,monitor,pvscan@}) as are them that seem to be messing with this.

rimusz commented 9 years ago

@AntonioMeireles no worries, as I do not have much time to play with it too. I just gave a shot

jbergstroem commented 9 years ago

Just tried this as well. Stops while trying to start udev on boot.

AntonioMeireles commented 9 years ago

@jbergstroem it works (tested with tip (built from source) xhyve). trick is to just format the volume in advance ...

jbergstroem commented 9 years ago

Ah, obviously. Now to conveniently doing that on a mac :)

AntonioMeireles commented 9 years ago

brew install e2fsprogs :smiley:

jbergstroem commented 9 years ago

Thanks man, now I feel slightly RTFM'ed!

jbergstroem commented 9 years ago

..actually, it still freezes:

$ /usr/local/opt/e2fsprogs/sbin/fsck.ext4 ~/vm/coreos/extra.img
e2fsck 1.42.12 (29-Aug-2014)
coreos-extra: clean, 11/1048576 files, 109841/4194304 blocks
$ sudo MEMORY=2048 IMG_HDD="-s 4,virtio-blk,/Users/jbergstroem/vm/coreos/extra.img" \
       SSHKEY="$(cat ~/.ssh/foo.pub)" ./coreos-xhyve-run
<snip>
[  OK  ] Started Rebuild Dynamic Linker Cache.
[  OK  ] Started Rebuild Hardware Database.
         Starting udev Coldplug all Devices...
[  OK  ] Started udev Coldplug all Devices.
         Starting udev Wait for Complete Device Initialization...
[  OK  ] Found device /dev/ttyS0.
[  *** ] A start job is running for udev Wai...vice Initialisation (59s / 3min)./coreos-xhyve-run: line 46: 92205 Killed: 9  

I've tried the beta channel to no avail.

AntonioMeireles commented 9 years ago

@jbergstroem humm, are you using a xhyve binary built from a xhyve git tip checkout (and not the one, right now, in homebrew) ?

jbergstroem commented 9 years ago

brew install --head xhyve

AntonioMeireles commented 9 years ago

edit coreos-xhyve-run and in CMDLINE cut acpi=off and try again plz. (that one is not yet merged - it's part of #34)

jbergstroem commented 9 years ago

..and I'm in. Thanks, again @AntonioMeireles.

AntonioMeireles commented 9 years ago

great to hear! thanks to you for your patience!

rimusz commented 9 years ago

@AntonioMeireles @jbergstroem no needs to pre-format the extra.img with e2fsprogs. I use format-ephemeral.service to check if the /dev/vda is formatted, if not it gets formatted. This is the snippet from my user-data:

...
    - name: fleet.service
      command: start
    - name: format-ephemeral.service
      command: start
      content: |
        [Unit]
        Description=Formats the ephemeral drive
        [Service]
        Type=oneshot
        RemainAfterExit=yes
        ExecStart=/bin/sh -c '/usr/sbin/blkid -pi /dev/vda | grep TYPE= || /usr/sbin/mkfs.ext4 /dev/vda'
    - name: var-lib-docker.mount
      command: start
      content: |
        [Unit]
        Description=Mount ephemeral to /var/lib/docker
        Requires=format-ephemeral.service
        After=format-ephemeral.service
        Before=docker.service
        [Mount]
        What=/dev/vda
        Where=/var/lib/docker
        Type=ext4
    - name: docker-tcp.socket
...