After every boot of Ubuntu 20.04, I find that the mysql.service has failed to start - but I can restart it manually successfully.
Looking in syslog during the boot, I can see that the mysql.service is starting before its file system is mounted (/var/lib/mysql is a mount point for a logical volume).
So mysql.service always fails during the boot sequence, because it can't find its files. The service always starts successfully after the boot has completed.
How can I fix this?
Restore the system like it was before you did ..
System directories need to be on the same disk for this very reason. The system expects these directories to be available on boot. What you did only works when your logical volume is mounted before the system partition. And that hardly ever is the case.
What you should do, after you fixed this, is edit the setting (the
datadir
option) for wher MySQL needs to look for the databases. That can be set to another volume as the database is only needed when MySQL is up and running and that happens a lot later in the chain.