linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* identifying failed disk/s in an array.
@ 2008-01-23  5:05 Michael Harris
  2008-01-23  6:56 ` Tomasz Chmielewski
  2008-01-23 15:22 ` Nagilum
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Harris @ 2008-01-23  5:05 UTC (permalink / raw)
  To: linux-raid

Hi,

I have just built a Raid 5 array  using mdadm and while it is running fine I have a question, about identifying the order of disks in the array.

In the pre sata days you would connect your drives as follows:

Primary Master - HDA
Primary Slave - HDB
Secondary - Master - HDC
Secondary - Slave -HDD

So if disk HDC failed i would know it was the primary disk on the secondary controller and would replace that drive.

My current setup is as follows

MB Primary Master (PATA) Primary Master - Operating System

The array disks are attached to:

MB Sata port 1 
MB Sata port 2
PCI card Sata port 1

When i setup the array the OS drive was SDA and the other SDB,SDC,SDD.

Now the problem is everytime i reboot, the drives are sometimes detected in a different order, now because i mount root via the UUID of the OS disk and the kernel looks at the superblocks of the raided drives everything comes up fine, but I'm worried that if i move the array to another machine and need to do a mdadm --assemble that i won't know the correct order of the disks and what is more worrying if i have a disk fail say HDC for example, i wont know which disk HDC is as it could be any of the 5 disks in the PC. Is there anyway to make it easier to identify which disk is which?.

thanks

Mike




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: identifying failed disk/s in an array.
  2008-01-23  5:05 identifying failed disk/s in an array Michael Harris
@ 2008-01-23  6:56 ` Tomasz Chmielewski
  2008-01-23 12:02   ` David Greaves
  2008-01-23 15:22 ` Nagilum
  1 sibling, 1 reply; 5+ messages in thread
From: Tomasz Chmielewski @ 2008-01-23  6:56 UTC (permalink / raw)
  To: Michael Harris; +Cc: linux-raid

Michael Harris schrieb:
> Hi,
> 
> I have just built a Raid 5 array  using mdadm and while it is running fine I have a question, about identifying the order of disks in the array.
> 
> In the pre sata days you would connect your drives as follows:
> 
> Primary Master - HDA
> Primary Slave - HDB
> Secondary - Master - HDC
> Secondary - Slave -HDD
> 
> So if disk HDC failed i would know it was the primary disk on the secondary controller and would replace that drive.
> 
> My current setup is as follows
> 
> MB Primary Master (PATA) Primary Master - Operating System
> 
> The array disks are attached to:
> 
> MB Sata port 1 
> MB Sata port 2
> PCI card Sata port 1
> 
> When i setup the array the OS drive was SDA and the other SDB,SDC,SDD.
> 
> Now the problem is everytime i reboot, the drives are sometimes detected in a different order, now because i mount root via the UUID of the OS disk and the kernel looks at the superblocks of the raided drives everything comes up fine, but I'm worried that if i move the array to another machine and need to do a mdadm --assemble that i won't know the correct order of the disks and what is more worrying if i have a disk fail say HDC for example, i wont know which disk HDC is as it could be any of the 5 disks in the PC. Is there anyway to make it easier to identify which disk is which?.

If the drives have any LEDs, the most reliable way would be:

dd if=/dev/drive of=/dev/null

Then look which LED is the one which blinks the most.


-- 
Tomasz Chmielewski
http://wpkg.org



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: identifying failed disk/s in an array.
  2008-01-23  6:56 ` Tomasz Chmielewski
@ 2008-01-23 12:02   ` David Greaves
  2008-01-23 14:00     ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: David Greaves @ 2008-01-23 12:02 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: Michael Harris, linux-raid

Tomasz Chmielewski wrote:
> Michael Harris schrieb:
>> i have a disk fail say HDC for example, i wont know which disk HDC is
>> as it could be any of the 5 disks in the PC. Is there anyway to make
>> it easier to identify which disk is which?.
> 
> If the drives have any LEDs, the most reliable way would be:
> 
> dd if=/dev/drive of=/dev/null
> 
> Then look which LED is the one which blinks the most.

And/or use smartctl to look up the make/model/serial number and look at the
drive label. I always do this to make sure I'm pulling the right drive (also
useful to RMA the drive)


David

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: identifying failed disk/s in an array.
  2008-01-23 12:02   ` David Greaves
@ 2008-01-23 14:00     ` Wolfgang Denk
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2008-01-23 14:00 UTC (permalink / raw)
  To: David Greaves; +Cc: Tomasz Chmielewski, Michael Harris, linux-raid

In message <47972CCD.5010600@dgreaves.com> you wrote:
>
> And/or use smartctl to look up the make/model/serial number and look at the
> drive label. I always do this to make sure I'm pulling the right drive (also
> useful to RMA the drive)

Or, probblay even faster, do a "ls -l /dev/disk/by-id" (assuming you
are using udev).

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Command, n.:
            Statement presented by a human and accepted by a computer
in such a manner as to make the human feel as if he is in control.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: identifying failed disk/s in an array.
  2008-01-23  5:05 identifying failed disk/s in an array Michael Harris
  2008-01-23  6:56 ` Tomasz Chmielewski
@ 2008-01-23 15:22 ` Nagilum
  1 sibling, 0 replies; 5+ messages in thread
From: Nagilum @ 2008-01-23 15:22 UTC (permalink / raw)
  To: Michael Harris; +Cc: linux-raid

----- Message from michael.harris@rmit.edu.au ---------
     Date: Wed, 23 Jan 2008 16:05:40 +1100
     From: Michael Harris <michael.harris@rmit.edu.au>
Reply-To: Michael Harris <michael.harris@rmit.edu.au>
  Subject: identifying failed disk/s in an array.
       To: linux-raid@vger.kernel.org


> Hi,
>
> I have just built a Raid 5 array  using mdadm and while it is   
> running fine I have a question, about identifying the order of disks  
>  in the array.
>
> In the pre sata days you would connect your drives as follows:
>
> Primary Master - HDA
> Primary Slave - HDB
> Secondary - Master - HDC
> Secondary - Slave -HDD
>
> So if disk HDC failed i would know it was the primary disk on the   
> secondary controller and would replace that drive.
>
> My current setup is as follows
>
> MB Primary Master (PATA) Primary Master - Operating System
>
> The array disks are attached to:
>
> MB Sata port 1
> MB Sata port 2
> PCI card Sata port 1
>
> When i setup the array the OS drive was SDA and the other SDB,SDC,SDD.
>
> Now the problem is everytime i reboot, the drives are sometimes   
> detected in a different order, now because i mount root via the UUID  
>  of the OS disk and the kernel looks at the superblocks of the  
> raided  drives everything comes up fine, but I'm worried that if i  
> move the  array to another machine and need to do a mdadm --assemble  
> that i  won't know the correct order of the disks and what is more  
> worrying  if i have a disk fail say HDC for example, i wont know  
> which disk  HDC is as it could be any of the 5 disks in the PC. Is  
> there anyway  to make it easier to identify which disk is which?.

----- End message from michael.harris@rmit.edu.au -----

Try this:
mdadm -Q --detail /dev/md0
to see which disk is which disk in the raid.
To identify a disk you can examine it using:
mdadm -E /dev/sd[b-d]
and read your dmesg.
And finally you can use "blkid" to associate UUIDs with devices.
I hope this helps.
Kind regards,
Alex.

========================================================================
#    _  __          _ __     http://www.nagilum.org/ \n icq://69646724 #
#   / |/ /__ ____ _(_) /_ ____ _  nagilum@nagilum.org \n +491776461165 #
#  /    / _ `/ _ `/ / / // /  ' \  Amiga (68k/PPC): AOS/NetBSD/Linux   #
# /_/|_/\_,_/\_, /_/_/\_,_/_/_/_/   Mac (PPC): MacOS-X / NetBSD /Linux #
#           /___/     x86: FreeBSD/Linux/Solaris/Win2k  ARM9: EPOC EV6 #
========================================================================


----------------------------------------------------------------
cakebox.homeunix.net - all the machine one needs..

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-01-23 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-23  5:05 identifying failed disk/s in an array Michael Harris
2008-01-23  6:56 ` Tomasz Chmielewski
2008-01-23 12:02   ` David Greaves
2008-01-23 14:00     ` Wolfgang Denk
2008-01-23 15:22 ` Nagilum

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).