Missing space on boot drive...

    • Resolved
    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Here is what I did to move my docker files to my storage drive and have everything work without having to redo any docker settings. Everything worked just as it did before the move.

      1.) I created a shared folder on my storage drive named Docker. I purposely left the name the same as on the boot drive just in case anything related to my containrs required the specific path name of 'docker'. Maybe it didn't matter, but I wasn't taking any chances.

      2.) I then copied the contents of /var/lib/docker to /sharedfolders/Docker (change this path to match where you want to store the files) using the command cp -a /var/lib/docker/. /sharedfolders/Docker/ (again, change paths to match yours). Note: I think this is the command I used. I was doing so many google searches that I might have the wrong command line instructions here. I'm new enough to linux to possibly have this wrong. Hopefully someone can verify this is the correct command.

      3.) Edited the Docker path setting in the WebUI to point to my Docker folder on the storage drive.

      4.) Verified that everything worked as before and then rm'd the docker directory in the /var/lib folder on my boot drive to free up the missing space.

      Took all of 10 minutes once I learned how it was all done thanks to the guys here. This should allow everything to work without having to redo each container from scratch.
    • flyinjoe13 wrote:

      Here is what I did to move my docker files to my storage drive and have everything work without having to redo any docker settings. Everything worked just as it did before the move.

      1.) I created a shared folder on my storage drive named Docker. I purposely left the name the same as on the boot drive just in case anything related to my containrs required the specific path name of 'docker'. Maybe it didn't matter, but I wasn't taking any chances.

      2.) I then copied the contents of /var/lib/docker to /sharedfolders/Docker (change this path to match where you want to store the files) using the command cp -a /var/lib/docker/. /sharedfolders/Docker/ (again, change paths to match yours). Note: I think this is the command I used. I was doing so many google searches that I might have the wrong command line instructions here. I'm new enough to linux to possibly have this wrong. Hopefully someone can verify this is the correct command.

      3.) Edited the Docker path setting in the WebUI to point to my Docker folder on the storage drive.

      4.) Verified that everything worked as before and then rm'd the docker directory in the /var/lib folder on my boot drive to free up the missing space.

      Took all of 10 minutes once I learned how it was all done thanks to the guys here. This should allow everything to work without having to redo each container from scratch.
      thank you @flyinjoe13 - obviously the key factor ist the "-a" - argument for the cp-command. Before, I just used "cp -r" but my mariadb and nextcloud docker didn't work (althouth they started). Now with "cp -a" everything seems to be fine ;)
    • tkaiser wrote:

      NasAxMan wrote:

      - created ext4 filesystem labeled "Data" on my empty partition mmcblk0p3
      - created sharedfolder "Docker" on device "Data"
      I hope you do regular backups of your SD card in the future since due to constant writes with rather high Write Amplification it might die sooner than you expect (try of an explanation)
      so you suggest to move the docker-path to an external hdd anyway? Because with the standard setting in OMV on a raspberry, the path would also be on the SD card (on root)....?
    • As long as the docker images are few, small and not frequently updated, it should be fine to use the default docker base path /var/lib/docker. But docker images tend to be many, big and frequently updated. Then having them on the SD card may cause the SD card to fail sooner than later. Or fill the rootfs.
      OMV 4, 7 x ODROID HC2, 1 x ODROID HC1, 3 x 12TB, 2 x 8TB, 1 x 4TB, 1 x 2TB SSHD, 1 x 500GB SSD, GbE, WiFi mesh
    • Adoby wrote:

      As long as the docker images are few, small and not frequently updated, it should be fine to use the default docker base path /var/lib/docker. But docker images tend to be many, big and frequently updated. Then having them on the SD card may cause the SD card to fail sooner than later. Or fill the rootfs.
      This is truth here... When I started messing with Docker, my intention was to only use 1... Now I'm up to 7 (8 if you count watchtower).. and I've probably tested at least 5-6 more before deciding I really didn't need/want them.
      Air Conditioners are a lot like PC's... They work great until you open Windows.

    • NasAxMan wrote:

      flyinjoe13 wrote:

      Here is what I did to move my docker files to my storage drive and have everything work without having to redo any docker settings. Everything worked just as it did before the move.

      1.) I created a shared folder on my storage drive named Docker. I purposely left the name the same as on the boot drive just in case anything related to my containrs required the specific path name of 'docker'. Maybe it didn't matter, but I wasn't taking any chances.

      2.) I then copied the contents of /var/lib/docker to /sharedfolders/Docker (change this path to match where you want to store the files) using the command cp -a /var/lib/docker/. /sharedfolders/Docker/ (again, change paths to match yours). Note: I think this is the command I used. I was doing so many google searches that I might have the wrong command line instructions here. I'm new enough to linux to possibly have this wrong. Hopefully someone can verify this is the correct command.

      3.) Edited the Docker path setting in the WebUI to point to my Docker folder on the storage drive.

      4.) Verified that everything worked as before and then rm'd the docker directory in the /var/lib folder on my boot drive to free up the missing space.

      Took all of 10 minutes once I learned how it was all done thanks to the guys here. This should allow everything to work without having to redo each container from scratch.
      thank you @flyinjoe13 - obviously the key factor ist the "-a" - argument for the cp-command. Before, I just used "cp -r" but my mariadb and nextcloud docker didn't work (althouth they started). Now with "cp -a" everything seems to be fine ;)
      Your welcome. It was nice to help someone for a change because all i've done so far in my short time here is ask questions.

      Yes the -a is the key. I can't remember exactly what the directions said, but it was something about not only copying the files and folders but also the file attributes and symlinks.