Innodb;多个数据目录 [英] Innodb; multiple data directories

查看:89
本文介绍了Innodb;多个数据目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将两个Innodb数据库文件存储在单独的分区上. (一个数据库在raid0上是为了提高速度,另一个在raid1上是为了提高稳定性)

I have a requirement to store two Innodb database files on separate partitions. (one database on raid0 for speed, the other on raid1 for stability)

据我所读,实现此目的的唯一方法是使用innodb_file_per_table并将.ibd和.frm文件在可能存在的任何地方符号链接到已配置的mysql存储目录(/var/lib/mysql在我的系统上),ibdata1文件必须存在(用于表元数据).

From what I've read, the only way to accomplish this is by using innodb_file_per_table and symlinking .ibd and .frm files wherever-they-may-live to the configured mysql storage directory (/var/lib/mysql on my system), where the ibdata1 file must live (for table metadata).

这是完成拆分的唯一方法吗?

Is this the only way to accomplish the split?

是否存在与myisam的TABLE/INDEX DIRECTORY类似的innodb?

Is there an innodb analog to myisam's TABLE/INDEX DIRECTORY?

推荐答案

我今天为此写了一篇博客文章: http: //www.mysqlperformanceblog.com/2010/12/25/spreading-ibd-files-across-multiple-disks-the-optimization-that-isnt/

I just wrote a blog post on this today: http://www.mysqlperformanceblog.com/2010/12/25/spreading-ibd-files-across-multiple-disks-the-optimization-that-isnt/

您不想做符号链接-而且InnoDB不支持DATA DIRECTORY/INDEX DIRECTORY.

You don't want to do the symlinking thing - and InnoDB does not support DATA DIRECTORY/INDEX DIRECTORY.

对于InnoDB,您实际上需要整个数据系统的稳定性.假设-

You actually need stability of the data system wide for InnoDB. Let's say -

  • 您有关键表A,B,C.
  • 非关键表是D,E,F.
  • 如果将D,E,F重定位到/mnt/RAID0,并且丢失了该卷,则InnoDB实际上也不允许您再访问表A,B,C.
  • 除非它可以访问您的所有数据,否则InnoDB将拒绝启动.

如果您有两个非常不同的数据要求,则需要安装两次MySQL;)

If you have two very different data requirements, you need two installs of MySQL ;)

这篇关于Innodb;多个数据目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆