linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Robinson <john.robinson@anonymous.org.uk>
To: Nat Makarevitch <Shelso@makarevitch.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: Determining which spindle is out of order
Date: Wed, 03 Nov 2010 14:43:03 +0000	[thread overview]
Message-ID: <4CD174F7.6070904@anonymous.org.uk> (raw)
In-Reply-To: <loom.20101103T115828-494@post.gmane.org>

On 03/11/2010 14:13, Nat Makarevitch wrote:
> Hi,
>
> After a spindle (physical hard disk, a "drive") failure in a "md" RAID array,
> how can we know which spindle must be replaced?
>
> We want to avoid extracting a working spindle by mistakenly thinking it is the
> faulty one...
>
> To solve this problem we put on each spindle a physical label (a tag, not a
> partition/disk label) showing its device name (sda, sdb...).
>
> To do so: on an otherwise unused system and sane RAID array we ran "dd" for each
> each spindle (individual device) in order to read on it, lighting up its LED.
>
> Then we simulated a crash by physically removing two spindles. Upon reboot the
> devices names changed (?!) and our labels weren't right anymore albeit we are
> pretty sure they were.
>
> Context: raid10, 10 spindles (8 active + 2 spare), layout : near=1, offset=3. On
> the integrated controller + a LSI MPT on-board controller.

That's right, drive letters sda sdb etc are allocated in the order 
they're discovered at boot time, so if you remove what used to be sdc 
and reboot, sdc will now refer to what used to be sdd, sdd to the old 
sde etc.

Have a look at /dev/disk/by-path, in there you'll find symlinks which 
will always have the same names, or indeed be missing, which point to 
sda, sdb etc. In my case I have SATA discs on an ICH10R controller, the 
controller is pci-0000:00:1f.2, it appears as up to 6 SCSI controllers 
numbered 0-5, and the discs appear as HBA 0, device 0, lun 0, along with 
their partitions, as follows:

pci-0000:00:1f.2-scsi-0:0:0:0 -> ../../sda
pci-0000:00:1f.2-scsi-0:0:0:0-part1 -> ../../sda1
pci-0000:00:1f.2-scsi-0:0:0:0-part2 -> ../../sda2
pci-0000:00:1f.2-scsi-1:0:0:0 -> ../../sdb
pci-0000:00:1f.2-scsi-1:0:0:0-part1 -> ../../sdb1
pci-0000:00:1f.2-scsi-1:0:0:0-part2 -> ../../sdb2
pci-0000:00:1f.2-scsi-2:0:0:0 -> ../../sdc
pci-0000:00:1f.2-scsi-2:0:0:0-part1 -> ../../sdc1
pci-0000:00:1f.2-scsi-2:0:0:0-part2 -> ../../sdc2
pci-0000:03:00.0-scsi-0:0:0:0 -> ../../scd0

Oh and the last one is a CD ROM drive on a pata_marvell IDE controller.

You might want to relabel your drives according to what you find in 
/dev/disk/by-path.

Cheers,

John.


  parent reply	other threads:[~2010-11-03 14:43 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 14:13 Determining which spindle is out of order Nat Makarevitch
2010-11-03 14:38 ` Roman Mamedov
2010-11-03 15:17   ` Graham Mitchell
2010-11-03 16:05     ` Roman Mamedov
2010-11-03 19:00       ` Jon Hardcastle
2010-11-03 14:43 ` John Robinson [this message]
2010-11-03 14:45 ` Tim Small
2010-11-03 15:59   ` Jon Hardcastle
2010-11-03 17:17     ` Bill Davidsen
2010-11-03 20:03       ` Tim Small
2010-11-03 15:29 ` Mikael Abrahamsson
2010-11-03 21:54 ` Phil Turmel
2010-11-03 22:26   ` Roman Mamedov
2010-11-04  9:29   ` Tom Carlson
2010-11-06 10:22   ` Leslie Rhorer
2010-11-06 15:12     ` Phil Turmel
     [not found]       ` <4CD57867.4010207@anonymous.org.uk>
2010-11-06 16:02         ` Phil Turmel
2010-11-06 16:11           ` Mathias Burén
2010-11-06 16:45           ` Jan Ceuleers
2010-11-06 19:39             ` Phil Turmel
2010-11-06 20:16               ` Leslie Rhorer
2010-11-06 20:23               ` Mr. James W. Laferriere
2010-11-07  7:51               ` Jan Ceuleers
2010-11-07 12:53           ` John Robinson
2010-11-07 13:21             ` Phil Turmel
2010-11-07 13:43               ` John Robinson
2010-11-07 14:43                 ` Phil Turmel
2010-11-07 15:04                   ` Mathias Burén
2010-11-07 15:19                   ` John Robinson
2010-11-07 18:39                     ` Phil Turmel
2010-11-07 20:46                       ` Leslie Rhorer
2010-11-07 21:22                         ` John Robinson
2010-11-08 18:59                           ` John Robinson
2010-11-07 21:24                       ` Andreas Dröscher
2010-11-08 21:05                   ` Mr. James W. Laferriere
2010-11-07 20:52                 ` Roman Mamedov
2010-11-09 14:40                   ` Phil Turmel
2010-11-06 19:58       ` Leslie Rhorer
2010-11-06 21:17       ` John Robinson

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=4CD174F7.6070904@anonymous.org.uk \
    --to=john.robinson@anonymous.org.uk \
    --cc=Shelso@makarevitch.org \
    --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).