Mysql on ZFS

    • OMV 1.0
    • Resolved
    • Mysql on ZFS

      On OMV VM, i have install zfs plugin and i would install mysql.
      Mysql don't want to start.
      I take this error :

      Source Code

      1. Erreur #4000: exception 'OMVException' with message
      2. 'Failed to execute command 'export LANG=C; invoke-rc.d 'mysql' start 2>&1': Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
      3. invoke-rc.d: initscript mysql, action "start" failed.' in /usr/share/php/openmediavault/initscript.inc:176
      4. Stack trace:
      5. #0 /usr/share/php/openmediavault/initscript.inc(141): OMVSysVInitScript->invoke('start')
      6. #1 /usr/share/php/openmediavault/initscript.inc(61): OMVSysVInitScript->start()
      7. #2 /usr/share/openmediavault/engined/module/mysql.inc(117): OMVSysVInitScript->exec()
      8. #3 /usr/share/openmediavault/engined/rpc/config.inc(206): OMVModuleMySQL->startService()
      9. #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array, Array)
      10. #5 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      11. #6 /usr/share/php/openmediavault/rpcservice.inc(158): OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      12. #7 /usr/share/openmediavault/engined/rpc/config.inc(224): OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      13. #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array, Array)
      14. #9 /usr/share/php/openmediavault/rpcservice.inc(125): call_user_func_array(Array, Array)
      15. #10 /usr/share/php/openmediavault/rpc.inc(79): OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      16. #11 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg', Array, Array, 1)
      17. #12 {main}
      Display All


      and in syslog

      Source Code

      1. Feb 26 10:17:21 openmediavault-test mysqld_safe: Starting mysqld daemon with databases from /zfsPool/mysql/
      2. Feb 26 10:17:21 openmediavault-test mysqld: 150226 10:17:21 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
      3. Feb 26 10:17:21 openmediavault-test mysqld: 150226 10:17:21 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
      4. Feb 26 10:17:21 openmediavault-test mysqld: 150226 10:17:21 [Note] Plugin 'FEDERATED' is disabled.
      5. Feb 26 10:17:21 openmediavault-test mysqld: 150226 10:17:21 InnoDB: The InnoDB memory heap is disabled
      6. Feb 26 10:17:21 openmediavault-test mysqld: 150226 10:17:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins
      7. Feb 26 10:17:21 openmediavault-test mysqld: 150226 10:17:21 InnoDB: Compressed tables use zlib 1.2.7
      8. Feb 26 10:17:21 openmediavault-test mysqld: 150226 10:17:21 InnoDB: Using Linux native AIO
      9. Feb 26 10:17:21 openmediavault-test mysqld: 150226 10:17:21 InnoDB: Initializing buffer pool, size = 128.0M
      10. Feb 26 10:17:21 openmediavault-test mysqld: 150226 10:17:21 InnoDB: Completed initialization of buffer pool
      11. Feb 26 10:17:21 openmediavault-test mysqld: 150226 10:17:21 InnoDB: highest supported file format is Barracuda.
      12. Feb 26 10:17:21 openmediavault-test mysqld: 150226 10:17:21 InnoDB: Operating system error number 22 in a file operation.
      13. Feb 26 10:17:21 openmediavault-test mysqld: InnoDB: Error number 22 means 'Invalid argument'.
      14. Feb 26 10:17:21 openmediavault-test mysqld: InnoDB: Some operating system error numbers are described at
      15. Feb 26 10:17:21 openmediavault-test mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
      16. Feb 26 10:17:21 openmediavault-test mysqld: InnoDB: File name ./ib_logfile0
      17. Feb 26 10:17:21 openmediavault-test mysqld: InnoDB: File operation call: 'aio write'.
      18. Feb 26 10:17:21 openmediavault-test mysqld: InnoDB: Cannot continue operation.
      19. Feb 26 10:17:21 openmediavault-test mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
      Display All


      I go on google and found this : percona.com/forums/questions-d…ory-to-zfs-on-percona-5-5

      It means that the ZFS implementation you are currently running on that host does not support AIO.

      I add into extra option of mysql config :
      innodb_use_native_aio=0

      I save and mysql start !!!!!

      This is for information.
      Open Media Vault 2.2.6 (Stone burner) in Prod
      Open Media Vault 3.0.32 (Erasmus) in Test

      openmedivault Docker Container
      https://github.com/prbond/openmedivault-dockerfile

      Dev :
      openmediavault-fail2ban 1.1.5 for OMV2.X
      openmediavault-fail2ban 1.3.0 for OMV3.X
      https://github.com/prbond/openmediavault-fail2ban
      https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-fail2ban
    • I added a checkbox to disable AIO to the plugin in version 1.0.14 in the repo now.
      omv 4.1.12 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.11
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • I test openmediavault-mysql 1.0.14 and :

      Source Code

      1. Erreur
      2. #4000:
      3. exception 'OMVException' with message 'Failed to execute command 'export
      4. LANG=C; invoke-rc.d 'mysql' start 2>&1': Starting MySQL database
      5. server: mysqld . . . . . . . . . . . . . . failed!
      6. invoke-rc.d: initscript mysql, action "start" failed.' in
      7. /usr/share/php/openmediavault/initscript.inc:176
      8. Stack trace:
      9. #0 /usr/share/php/openmediavault/initscript.inc(141):
      10. OMVSysVInitScript->invoke('start')
      11. #1 /usr/share/php/openmediavault/initscript.inc(61):
      12. OMVSysVInitScript->start()
      13. #2 /usr/share/openmediavault/engined/module/mysql.inc(117):
      14. OMVSysVInitScript->exec()
      15. #3 /usr/share/openmediavault/engined/rpc/config.inc(206):
      16. OMVModuleMySQL->startService()
      17. #4 [internal function]: OMVRpcServiceConfig->applyChanges(Array,
      18. Array)
      19. #5 /usr/share/php/openmediavault/rpcservice.inc(125):
      20. call_user_func_array(Array, Array)
      21. #6 /usr/share/php/openmediavault/rpcservice.inc(158):
      22. OMVRpcServiceAbstract->callMethod('applyChanges', Array, Array)
      23. #7 /usr/share/openmediavault/engined/rpc/config.inc(224):
      24. OMVRpcServiceAbstract->callMethodBg('applyChanges', Array, Array)
      25. #8 [internal function]: OMVRpcServiceConfig->applyChangesBg(Array,
      26. Array)
      27. #9 /usr/share/php/openmediavault/rpcservice.inc(125):
      28. call_user_func_array(Array, Array)
      29. #10 /usr/share/php/openmediavault/rpc.inc(79):
      30. OMVRpcServiceAbstract->callMethod('applyChangesBg', Array, Array)
      31. #11 /usr/sbin/omv-engined(500): OMVRpc::exec('Config', 'applyChangesBg',
      32. Array, Array, 1)
      33. #12 {main}
      Display All


      There are a little mistake and this is a patch (if disable_aio != 1 then "innodb_use_native_aio=0" but the reverse )

      Difference-File

      1. --- mysql 2015-02-26 15:43:16.990875665 +0100
      2. +++ /usr/share/openmediavault/mkconf/mysql 2015-02-26 15:40:34.995917874 +0100
      3. @@ -91,7 +91,7 @@
      4. -i "port != ''" -v "concat('port = ', port)" -n -b \
      5. -i "bind_address != ''" -v "concat('bind-address = ', bind_address)" -n -b \
      6. -o "datadir = ${data_directory}" -n \
      7. - -i "disable_aio != 1" -o "innodb_use_native_aio=0" -n -b \
      8. + -i "disable_aio != 0" -o "innodb_use_native_aio=0" -n -b \
      9. -i "string-length(extra_options) > 0" -v "extra_options" -n -b \
      10. ${OMV_CONFIG_FILE} | xmlstarlet unesc > ${OMV_MYSQL_PLUGIN_CONFIG}
      Open Media Vault 2.2.6 (Stone burner) in Prod
      Open Media Vault 3.0.32 (Erasmus) in Test

      openmedivault Docker Container
      https://github.com/prbond/openmedivault-dockerfile

      Dev :
      openmediavault-fail2ban 1.1.5 for OMV2.X
      openmediavault-fail2ban 1.3.0 for OMV3.X
      https://github.com/prbond/openmediavault-fail2ban
      https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-fail2ban
    • Don't worry, it happens to the best :saint:
      Open Media Vault 2.2.6 (Stone burner) in Prod
      Open Media Vault 3.0.32 (Erasmus) in Test

      openmedivault Docker Container
      https://github.com/prbond/openmedivault-dockerfile

      Dev :
      openmediavault-fail2ban 1.1.5 for OMV2.X
      openmediavault-fail2ban 1.3.0 for OMV3.X
      https://github.com/prbond/openmediavault-fail2ban
      https://github.com/OpenMediaVault-Plugin-Developers/openmediavault-fail2ban