linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brendan Conoboy <blc@redhat.com>
To: linux-raid@vger.kernel.org
Subject: Spare-group drive affinity with mdadm?
Date: Wed, 11 Aug 2004 17:20:53 -0600	[thread overview]
Message-ID: <411AA9D5.7090508@redhat.com> (raw)

Hello,

I've just setup a raid 10 array (6 mirrors striped together) and have 
two extra drives available as hot spares.  The mirrors themselves are 
composed of two drives on separate scsi controllers to keep the SCSI bus 
from saturating.  The performance of this setup is just phenomenal, but 
the hot spares are not yet setup.

It appears that when using mdadm that one can use the spare-group 
feature to share a single hot-spare amongst multiple raid groups. 
AFAICT, this is done by placing the hot spare or spares in a single 
mirror, then designating it as part of the same spare group as a number 
of other mirrors using the same spare-group name.  For instance, if 
/dev/md0 has two spare drives, but /dev/md1 does not, I can do this to 
share the spares:

ARRAY /dev/md0 level=raid1 num-devices=2 
devices=/dev/sda1,/dev/sde1,/dev/sdc1,/dev/sdd1 spare-group=g1
ARRAY /dev/md1 level=raid1 num-devices=2 devices=/dev/sdb1,/dev/sdf1 
spare-group=g1
ARRAY /dev/md2 level=raid0 num-devices=2 devices=/dev/md0,/dev/md1

This is very handy, but performance-wise it's suboptimal.  When a drive 
fails the system might activate a spare that's on a different scsi chain 
than the drive that just failed, reducing overall redundancy and 
throughput.   It'd be nice if when a drive fails, a hot spare on the 
same chain would be preferred over a drive on a different chain.  Of 
course this is a pretty arbitrary distinction and something that would 
need configuration, but it doesn't seem like too much of a stretch over 
what mdadm can do already.  Maybe some sort of extended mdadm.conf 
syntax like:

AFFINITY /dev/sda,/dev/sdb spares=/dev/sdc
AFFINITY /dev/sde,/dev/sdf spares=/dev/sdd

(Assuming sda, sdb and sdc are on one chain and sde, sdf, and sdd are on 
another).

Is an enhancement like this feasible?

Thanks,

-Brendan (blc@redhat.com)

             reply	other threads:[~2004-08-11 23:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-11 23:20 Brendan Conoboy [this message]
2004-08-18  2:27 ` Spare-group drive affinity with mdadm? Neil Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=411AA9D5.7090508@redhat.com \
    --to=blc@redhat.com \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).