Failed to start mysql after moving to new partition

CroiOS asked:

I used to use mysql data in /var/lib/mysql, now I have created new partition and created tank on it to use with zfs.

After that I follow this steps to move my existing mysql data to new dir: http://serverfault.com/a/539729/184573

Everything worked ok so I have imported new big db (100 GB) and now is not working anymore.

I’m getting this error
enter image description here

in “/var/log/mysql/error.log”

Detailed explanation:

  1. I’m on /tank/mysql, using zfs and everything is working ok

  2. imported new db, mysql was working ok

  3. stopped mysql service and executed zfs

  4. snapshot tank/mysql@imported now I cannot start mysql because of
    upper error

  5. tried to chown mysql:mysql /tank/mysql -R , still same error

I have google that problem and none of solutions helped me. Permissions, settings,… everything seems to be ok.

OS: Ubuntu server 14.04.

Server: IBM X3200 m3

What could be a problem?

Thank you

My answer:


Why don’t you just put the ZFS dataset in the location MySQL expects?

zfs set mountpoint=/var/lib/mysql tank/mysql

Now you don’t have to worry about strange permissions on /tank and everything looks normal to the rest of the system.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.