Centos – How to force soft raid to read only from one disk

centoscentos6mdadmraidsoftware-raid

I have quite a large IO wait showing in top. I suspect this is fault of SDA drive (on of 2 disks in RAID array), which was replaced about week ago. There are no errors visible, smart showing nothing, but disk SDA in atop is always a lot more busy then SDB.
SDA is not rebuilding, so that's not the problem.

It seems the problem it not with writes, but with reads only.

I would like to force RAID to read only from one disk, SDB, to check if it's going to work better. Is it possible to force RAID to read only from SDB, while still write to both?

I'm using a software Linux MD RAID on CentOS 6.0.

Best Answer

Although not a fix for your underlying problem, the mdadm command has the --write-mostly option:

-W, --write-mostly
subsequent devices listed in a --build, --create, or --add command 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 mirroring over a slow link.

so remove sda from you array and add it again with that option.