What happens when Rancher runs out of disk space?

We have Rancher configured to save image data into /mnt drive. What will happen when that drive is full? Is there any garbage collection to remove image layers that aren’t in use?

hi,
to save some space, you can install via the community catalog, the janitor container, which will remove unused images.

hope it helps,

Charles.

1 Like

Thanks! Neat approach, though it seems to have /var/lib/docker hardcoded; and I’m using /mnt

I haven’t looked into the community catalog entry for janitor container, but if you wanted to alter the /var/lib/docker, you could try copying the docker-compose.yml and rancher-compose.yml and edit to /mnt to launch either in the UI (using Add Stack) or using rancher-compose.

If possible you would really be better off mounting whatever device /mnt is at /var/lib/docker instead of changing the storage path… a wide variety of software expects it there.

From firsthand experience, Rancher will throw a syntax error on the login screen so you can’t login, once the space issue is fixed you can login without issues, probably not safe to restart the box.