I have “old” containers on the DIR backend that have MySQL on them. I copied one DIR container over to another server, with ZFS, with a container that has a custom volume at path=/var/lib/mysql (to have recordsize=16k on the zfs filesystem, thanks for showing me that @stgraber!).
The problem is that zfs list does not show any storage usage of the mysql-volume as the config of the original conatiner was copied over as well of course.
What is the best way to achieve the mysql data being on the volume as attaching the volume again will empty the mysql folder? And importing a mysqldump won’t work as the mysql server won’t start with an empty folder. And backing up the folder and putting it back does not work either.
It would be nice to have a built in way to handle this kind of situation for volumes.