We figured out that an upgrade from mysql to mariadb caused the issue. The database is not completely lost but more or less renamed. We found this hint in the apt logs:
The file /var/lib/mysql/debian-5.7.flag indicates a version that cannot automatically be upgraded. Therefore the previous data directory will be renamed to /var/lib/mysql-5.7 and a new data directory will be initialized at /var/lib/mysql. Please manually export/import your data (e.g. with mysqldump) if needed.Seems like this is kind of a known problem: https://askubuntu.com/questions/766917/14-04-to-16-04-killed-mysql
Right now we are working on getting the old database back up. Not looking promising. MariaDB crashes terribly when we let it start on the old MySQL 5.7 DB files.
Edit: We were not able to start up the old DB with the new MariaDB version. So the only way I could see was setting up another system (probably old Ubuntu 14.04) with the old MySQL 5.7 version, get up the database there and do a mysqldump as this format can be imported into newer versions. So we decided that it’s probably less work to manually add the image definitions by hand than recovering the old DB. Hope this topic will be helpful for others running into this. Although I guess there aren’t many people still around upgrading from the old version.
@dospace I’ll mark this solved now as the initial issue is found. If you run into issues with manually creating the image definitions just open a new topic and post all the details there (ls -al /images/<IMAGENAME> as well as file /images/<IMAGENAME>/d1p1.img).