Hello,

I'm running Debian 7.
Installed mysql with apt-get install mysql-server.

Changed my my.cnf to the following:

----
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin

[mysqld1]
datadir = /var/lib/mysql/mysql1
socket = /var/lib/mysql/mysql1/mysql.sock
pid-file = /var/lib/mysql/mysql1.pid
user = mysql
port = 3306
server-id=1
log-bin=mysql-bin
log-error=/var/log/mysql/mysqld1.log

[mysqld2]
datadir=/var/lib/mysql/mysql2
socket=/var/lib/mysql/mysql2/mysql.sock
pid-file = /var/lib/mysql/mysql2/mysql2.pid
user=mysql
port = 3307
server-id=2
log-bin=mysql-bin
log-error=/var/log/mysql/mysqld2.log
---

Created the databases with mysql_install_db

Started mysql with mysqld_multi start

Runs perfectly.

NOW!

I changed my my.cnf to:

---
[mysqld_multi]
mysqld = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin

[mysqld1]
datadir = /storage/mysql/mysql1
socket = /storage/mysql/mysql1/mysql.sock
pid-file = /storage/mysql/mysql1.pid
user = mysql
port = 3306
server-id=1
log-bin=mysql-bin
log-error=/var/log/mysql/mysqld1.log
ignore-builtin-innodb
default-storage-engine=myisam

[mysqld2]
datadir=/storage/mysql/mysql2
socket=/storage/mysql/mysql2/mysql.sock
pid-file = /storage/mysql/mysql2/mysql2.pid
user=mysql
port = 3307
server-id=2
log-bin=mysql-bin
log-error=/var/log/mysql/mysqld2.log
---

/storage is a zfs pool and /storage/mysql is a dataset, not just a folder.
I changed the RWX of /storage/mysql to the correct settings and set up the databases with mysql_install_db

I can start the database as long as I run it with myisam but with innodb it's hopeless.

I've tried with innodb_use_native_aio=0 but still no luck. The logs only give the following:

---
141016 17:43:12 [Note] Plugin 'FEDERATED' is disabled.
141016 17:43:12 InnoDB: The InnoDB memory heap is disabled
141016 17:43:12 InnoDB: Mutexes and rw_locks use GCC atomic builtins
141016 17:43:12 InnoDB: Compressed tables use zlib 1.2.7
141016 17:43:12 InnoDB: Using Linux native AIO
141016 17:43:12 InnoDB: Initializing buffer pool, size = 128.0M
141016 17:43:12 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file ./ibdata1
141016 17:43:12 InnoDB: Could not open or create data files.
141016 17:43:12 InnoDB: If you tried to add new data files, and it failed here,
141016 17:43:12 InnoDB: you should now edit innodb_data_file_path in my.cnf back
141016 17:43:12 InnoDB: to what it was, and remove the new ibdata files InnoDB created
141016 17:43:12 InnoDB: in this failed attempt. InnoDB only wrote those files full of
141016 17:43:12 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
141016 17:43:12 InnoDB: remove old data files which contain your precious data!
141016 17:43:12 [ERROR] Plugin 'InnoDB' init function returned error.
141016 17:43:12 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
141016 17:43:12 [ERROR] Unknown/unsupported storage engine: InnoDB
141016 17:43:12 [ERROR] Aborting

141016 17:43:12 [Note] /usr/sbin/mysqld: Shutdown complete
---

Using innodb_use_native_aio=0 with a regular database works but not when using mysqld_multi.

Anybody with an idea?