EvilFreelancer / docker-routeros

Mikrotik RouterOS inside Docker container
https://hub.docker.com/r/evilfreelancer/docker-routeros/
MIT License
356 stars 127 forks source link

db failure: database or disk is full:stoppped #6

Closed offlinejke closed 4 years ago

offlinejke commented 4 years ago

Hello my friend. I use this image as a server for the Dude. Today I encountered such a problem while trying connect to server. I freed up a couple megabytes of space on routeros but still can't connect to the dude. How can fix it? May be is it possible to create a volume for a specific folder, or what may be the options?

EvilFreelancer commented 4 years ago

Hello @offlinejke !

As you probably know the RouterOS is not support dockerization process, so i've used VDI image in combination with qemu virtual machine.

https://github.com/EvilFreelancer/docker-routeros/blob/master/scripts/entrypoint.sh

That mean if you see "not enough space" error then space is ended inside VDI image.

I can suggest to look at this article and resize the VDI of your RouterOS.

Another idea is to make automatic resizing of the disk at the time of assembly of the docker container.

EvilFreelancer commented 4 years ago

Yet another article which may be helpful:

https://askubuntu.com/questions/280849/mount-bind-with-full-ownership-and-permissions

You can mount --bind any folder from your root system inside docker container, but for this will need update entrypoint.sh scripts with required parameters.

offlinejke commented 4 years ago

Thank you for your suggest. I will try this articles.

EvilFreelancer commented 4 years ago

This topic about sharing host filesystem in qemu

https://cialu.net/qemu-kvm-on-ubuntu-and-sharing-files-between-host-and-guests/

I think better way is 1) create docker-compose with volume which is some folder on your host machine and mountpoint inside container is some folder like /share 2) update entrypont.sh, need to add binding from /share of container to somewhere in virtual machine (i guess it should be folder with the dude database files, you can login to RouteOS in debug mode as root and check file system tree) 3) restart composition with new settings

For right now i don't know how exactly (only in general) make this but hope you can find the answer and explain to me :)

offlinejke commented 4 years ago

Just got to the case. So i added vdi file to vmware, expand disk to the required size, convert to vdi from vhdx and add it into the volume. Restarted container and that is all. Thanks for the help)