0

在 64 位 Ubuntu 可信服务器上:

我有 MariaDB 10.1 和不同的 datadir 工作

datadir=/mnt/SRVDATA/var/lib/mysql

昨天我收到了更新 10.1.13-MariaDB-1~trusty 来自

deb http://mirror.netcologne.de/mariadb/repo/10.1/ubuntu trusty main

MariaDB 不会再启动了。

我重命名了 /etc/mysql、/usr/lib/mysql 和 /var/lib/mysql 并重新安装了 MariaDB 服务器和客户端。我进行了 dpkg-reconfigure 并在 /var/lib/mysql 中获得了一个新的原始数据库。有了它,我可以启动 MariaDB。

我再次将 /var/lib/mysql 复制到具有所有权限的 /mnt/SRVDATA/var/lib/mysql ,我将 my.cnf 更改为将 datadir 指向 /mnt/SRVDATA/var/lib/mysql 但 MariaDB 不会启动。

Apparmor 已关闭,它的配置文件已拆除。

系统日志中的错误:

Mar 30 09:58:47 hg-bioinfo mysqld: 
Mar 30 09:58:47 hg-bioinfo mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
Mar 30 10:08:04 hg-bioinfo mysqld_safe: Starting mysqld daemon with databases from /mnt/SRVDATA/var/lib/mysql
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [Note] /usr/sbin/mysqld (mysqld 10.1.13-MariaDB-1~trusty) starting as process 30831 ...
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [Note] InnoDB: Using mutexes to ref count buffer pool pages
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [Note] InnoDB: The InnoDB memory heap is disabled
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [Note] InnoDB: Memory barrier is not used
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [Note] InnoDB: Compressed tables use zlib 1.2.8
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [Note] InnoDB: Using Linux native AIO
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [Note] InnoDB: Using SSE crc32 instructions
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [Note] InnoDB: Initializing buffer pool, size = 256.0M
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [Note] InnoDB: Completed initialization of buffer pool
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [Note] InnoDB: Highest supported file format is Barracuda.
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [ERROR] InnoDB: Tried to read 512 bytes at offset 512. Was only able to read 0.
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 7fe86f43d7c0  InnoDB: Operating system error number 22 in a file operation.
Mar 30 10:08:04 hg-bioinfo mysqld: InnoDB: Error number 22 means 'Invalid argument'.
Mar 30 10:08:04 hg-bioinfo mysqld: InnoDB: Some operating system error numbers are described at
Mar 30 10:08:04 hg-bioinfo mysqld: InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
Mar 30 10:08:04 hg-bioinfo mysqld:  InnoDB: Operation read to file /home/buildbot/buildbot/build/mariadb-10.1.13/storage/xtradb/os/os0file.cc and at line 3158
Mar 30 10:08:04 hg-bioinfo mysqld: 2016-03-30 10:08:04 140636275857344 [ERROR] InnoDB: File (unknown): 'read' returned OS error 222. Cannot continue operation
Mar 30 10:08:04 hg-bioinfo mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended
Mar 30 10:09:05 hg-bioinfo /etc/init.d/mysql[31401]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
Mar 30 10:09:05 hg-bioinfo /etc/init.d/mysql[31401]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
Mar 30 10:09:05 hg-bioinfo /etc/init.d/mysql[31401]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory")'
Mar 30 10:09:05 hg-bioinfo /etc/init.d/mysql[31401]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

非常感谢任何提示!

此致

4

1 回答 1

0

在#maria 的 FreeNode 上与 Montywi 进行了愉快的交谈后,事实证明这是 10.1.13 版本中引入的一个新错误。

它涉及配置:

innodb_flush_method=O_DIRECT

与块大小 <> 512 的文件系统上的 datadir 结合使用(我的是在 RAID 上)

目前的解决方法是:

innodb_flush_method=O_DSYNC

该错误现在正在修复中,很快就会在版本 10.1.14 中提供,所以 Montywi。

谢谢各位!

于 2016-03-30T12:08:36.630 回答