从ext4将mysql数据目录移动至lustre出现(InnoDB: Unable to lock ./ibdata1, error: 38.)

因为数据目录过大,因此我把目录从本地移到了共享存储中.在修改了/etc/my.cnf和/etc/init.d/mysqld之后发现数据库可以运行,但启动速度很慢

原因是原文件系统是ext4,而目标文件系统是lustre.lustre默认没有enable lock功能.而Mysqld启动时需要lock ibdata1.于是一直在lock.因为我数据库中并没有innode engine的表.所以数据库可以启动.

解决方法:

1.如果像我一样不需要innode功能,那么在mysql配置文件(/etc/my.cnf)加入一行"skip-innodb"就可以disable innode engine

2.如果的确需要用innode功能.那么需要打开lustre的锁功能.具体步骤请网上查阅

参考:

1.http://lists.lustre.org/pipermail/lustre-discuss/2007-August/003768.html

2.http://stackoverflow.com/questions/26587227/duration-of-starting-mysqld-is-too-long-on-lustre-file-system-innodb-unable-to

posted on 2014-10-29 09:24  york_hust  阅读(849)  评论(0编辑  收藏  举报