[solved]Ubuntu release upgrade converts docker container from overlay2 to the deprecated aufs storage driver


after upgrading an Ubuntu 18.04 LTS to 20.04 LTS, I noticed that the used storage driver overlay2 on 18.04 LTS was replaced by the deprecated aufs driver. All containers got migrated from overlay2 to aufs which is not intended and prevents easy upgrades to 22.04 LTS.

docker info:
Docker Engine Version:24.0.2 on ubuntu 18.04.06 LTS Kernel Version: 4.15.0-213-generic
Storage Driver: overlay2 Backing Filesystem: extfs

Initially before the upgrade there is only an overlay2 folder in /var/lib/docker where the writeable layers got stored. After the upgrade to 20.04 LTS an aufs folder gets created in /var/lib/docker and all containers gets migrated to aufs.

Is there a possibility to prevent this migration or force the preservation of overlay2 while doing the release upgrade of ubunutu to 20.04 LTS?


Edit:After analyzing further the issue, got the solution. The Ubuntu upgrade from 18.04 to 20.04 LTS installs an additional instance of docker through snap and migrates the containers. The initial docker installed through apt remains on the server but not active. After I uninstalled docker with snap (sudo snap remove docker) the initial docker installation got active with the right storage driver.

1 Like