Symptoms:
Docker restart fails with error:
failed to start daemon: error while opening volume store metadata database (/var/lib/docker/volumes/metadata.db): invalid database
Problem
Storage driver in/etc/docker/daemon.json
is changed from overlay2 to devicemapper, or from devicemapper to overlay2.
Solution:
Restore the file from backup or download orginal:
then restart docker service.