在mdadm RAID1设置中可以优先使用哪些设备进行写入/读取? 我想写两个设备以实现容错(AWS EBS和本地存储SSD),但是大多数情况下是从本地SSD读取以提高延迟并避免过多的AWS I / O费用?
以上设置是针对MySQL数据的。 理想情况下,查询将由作为caching的本地SSD进行处理,但是写入将会发送到EBS和SSD设备。
后续:我发现这篇文章http://tansi.info/hybrid/有没有人看到一个问题,如果在上面的设置硬盘被EBS取代?
答:准确的设置在这里描述http://hatim.eu/2014/05/25/leveraging-ssd-ephemeral-disks-in-ec2-part-2/
创build数组时可以使用-W选项。 从手册:
-W, --write-mostly subsequent devices listed in a --build, --create, or --add com‐ mand will be flagged as 'write-mostly'. This is valid for RAID1 only and means that the 'md' driver will avoid reading from these devices if at all possible. This can be useful if mirror‐ ing over a slow link.
为了进一步优化你的设置,请看看--write-behind 。