1

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.

5
  • What hardware are you running your RAID set on? Software or hardware RAID? Operating system? You've left out a lot of details.
    – Hyppy
    Dec 15, 2014 at 12:52
  • Sofware RAID, Centos 6.0.
    – M_per
    Dec 15, 2014 at 12:55
  • The first thing I'd be checking is the partition alighnment.
    – symcbean
    Dec 15, 2014 at 13:12
  • When you say "software RAID", do you mean "Linux MD RAID"? There are other software RAID solutions out there which can be made to work on Linux...
    – user
    Dec 15, 2014 at 13:59
  • Ok, question fixed, yes it's Linux MD RAID.
    – M_per
    Dec 15, 2014 at 15:16

2 Answers 2

3

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.

2
  • --write-mostly is also useful when building a RAID1 with an SSD and a normal hard disk; use --write-mostly with the hard disk so that reads are done on the SSD while you still have redundancy in case the SSD fails.
    – wurtel
    Dec 15, 2014 at 14:43
  • I consider it as a way to tell if sda is causing problems. Not as a way to solve underlying problem. So I guess this is solution I was looking for :)
    – M_per
    Dec 15, 2014 at 14:48
3

A part of the reason you might want to implement a RAID array is the read speed improvement.
Using only a single disk to read from, but writing to both, smells wrong.

If your actual problem is that you are experiencing worse read times since replacing a disk in your RAID setup, you might want to troubleshoot that disk instead of working around it.
Here are some tools to test your RAID setup.

Just to give you some added incentive:
You just noticed that your reads are slower, what if there's an underlying hardware issue with the disk?
You're going to partly bypass that disk, in which case you have a RAID only there for redundancy.
However we've just stated that your redundant drive is a possible lit fuse.
What purpose is your RAID setup still serving?

2
  • The problem is, that SDA is behaving strangely. It is working good for few minutes, then is slows down. It seems it is not working correctly. I would like to disable read from SDA to be sure, that that's what is causing high wait visible in top. I don't mean it as a permanent solution. I can of course remove SDA from RAID array, but than I would have to rebuild again.
    – M_per
    Dec 15, 2014 at 12:56
  • @M_per Doing something complicated that you're unfamiliar with is not a way to test performance problems. Find a good tool to test your disk. You want familiar waters to test your new boat...
    – Reaces
    Dec 15, 2014 at 13:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .