Expanding my root partition... to allow for docker images... How?

Currently reading
Expanding my root partition... to allow for docker images... How?

4,027
1,378
NAS
DS4l8play, DS202j, DS3623xs+, DSM 7.3.3-25847
Close call today on my Debian server... when I discovered I could not update docker images as there was no room left on my machine.

As I've not been attentive to removing old images, they added up to trouble today.

To avoid this in the future.. Can the images be made to reside within my home partition? I'm guessing not, but I have to ask.

Barring that, is there a safe way to juggle partition sizes? I'd like to take my root partition to 100 GB at the expense of my home partition. I do this fearlessly on Windows, but I'm less sure... OK, totally unsure... when it comes to Linux. I'd love to hear from those who have done this successfully. Thanks!
 
It turns out that the culprit is Docker's overlay2 directory, which had grown over 20 GB. After much searching, there seems to be no means to reduce this folder, short of trashing Docker.

So that leaves me a few options...
  • repartition my drive, to expand the / partition (with the risk of total loss)
  • move the overlay2 directory to the home partition, and add a deamon.json file to point to the new location
  • be more attentive to unused, past docker images I've been holding onto, and keep these at a bare minimum.
I'm surprised I haven't seen this with DSM as its OS partition is quite modest.

Anyone that has suggestions/recommendations for me, post on! Thanks.
 
move the overlay2 directory to the home partition, and add a deamon.json file to point to the new location
For future reference, the deamon.json file (created, not originally present) had no effect. Instead, I modified the docker.service file, which seems to have picked up on the new location for overlay2. Why, O why?
 
I modified the docker.service file, which seems to have picked up on the new location for overlay2.
Yesterday's Docker update completely wiped my container kingdom. Fortunately a "/" rollback (this is Debian) brought things back in line.

At this point I am guessing that the overlay2 directory location defaulted back to /var/docker after the update... an empty space.

I'm trying to decide whether to attempt this update again, and re-edit the docker-servce file to regain my container kingdom, or just throw in the towel, and repartition my drive to add 50 GB to "/".

This is one problem I never had with the Synology unit.

Any thoughts about this?
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top