* Re: Fwd: Identify SATA Disks
2007-05-23 23:29 ` Fwd: Identify SATA Disks lewis shobbrook
@ 2007-05-24 15:53 ` Colin McCabe
2007-05-24 16:06 ` Colin McCabe
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Colin McCabe @ 2007-05-24 15:53 UTC (permalink / raw)
Cc: Linux-Raid
lewis shobbrook wrote:
> Hi All,
> I'm wondering if anyone has discovered any nice tricks to assist in
> identification of hdd devices.
> I have an 8 bay hotswap array, pretty lights and have been wondering
> what others out there might be doing to determine which disk in an
> array is which.
>
> I've noted that device allocation can change with the generation of
> new initrd's and installation of new kernels; i.e. /dev/sdc becomes
> /dev/sda depending upon what order the modules load etc.
> I'm wondering if one could send a looped read/write task to a swap
> partition or something to determine which the device is?
>
The device UUID in the RAID superblock doesn't change across a reboot.
If you run mdadm --examine on the disk, you should see something like
[root@ss-110 root]# mdadm --examine /dev/sda
/dev/sda:
Magic : a92b4efc
Version : 01
Feature Map : 0x0
Array UUID : eab59421:6ddd9761:05e6ca46:d2342b03
Name : 408088ETX1:single
Creation Time : Mon Dec 4 21:25:55 2006
Raid Level : raid1
Raid Devices : 2
Device Size : 117210096 (55.89 GiB 60.01 GB)
Array Size : 117187500 (55.88 GiB 60.00 GB)
Used Size : 117187500 (55.88 GiB 60.00 GB)
Super Offset : 117210224 sectors
State : active
==>Device UUID : 06795ada:d2fb18a1:2e7de09f:af66a7e3 <==
Update Time : Thu May 24 11:49:21 2007
Checksum : 7a695b9f - correct
Events : 4346975
That number should always uniquely identify your disks.
Maybe even a better way is to run:
[root@ss-110 root]# smartctl -d ata /dev/sda -i
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: FUJITSU MHV2060BH
====> Serial Number: NW02T6826LM5 <====
Firmware Version: 00000028
User Capacity: 60,011,642,880 bytes
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 7
ATA Standard is: ATA/ATAPI-7 T13 1532D revision 4a
Local Time is: Thu May 24 11:51:16 2007 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
That serial number never changes, even if you wipe the disk.
Colin
> Cheers,
>
> Lew
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Fwd: Identify SATA Disks
2007-05-23 23:29 ` Fwd: Identify SATA Disks lewis shobbrook
2007-05-24 15:53 ` Colin McCabe
@ 2007-05-24 16:06 ` Colin McCabe
2007-05-24 16:19 ` Tomasz Chmielewski
2007-05-24 21:00 ` Gabor Gombas
3 siblings, 0 replies; 5+ messages in thread
From: Colin McCabe @ 2007-05-24 16:06 UTC (permalink / raw)
Cc: Linux-Raid
lewis shobbrook wrote:
> Also I've not had much joy in attempting to "hotswap" SATA on a live
> system.
> Can anyone attest to successful hotswap (or blanket rule out as
> doesn't work) using std on board SATA controllers, cf dedicated raid
> card, or suggest further reading?
> I've spent considerable time here and there in recent years trying to
> find some decent info on this...
Hotswap works fine for me. My disks are both: FUJITSU MHV2060BH
The serial ata controller is recognized as an ICH6.
Make sure that your BIOS settings are in serial ATA mode, not legacy
emulation mode. Also, you should be using the libata driver if you want
hotswap.
Colin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: Identify SATA Disks
2007-05-23 23:29 ` Fwd: Identify SATA Disks lewis shobbrook
2007-05-24 15:53 ` Colin McCabe
2007-05-24 16:06 ` Colin McCabe
@ 2007-05-24 16:19 ` Tomasz Chmielewski
2007-05-24 21:00 ` Gabor Gombas
3 siblings, 0 replies; 5+ messages in thread
From: Tomasz Chmielewski @ 2007-05-24 16:19 UTC (permalink / raw)
To: lewis shobbrook; +Cc: Linux-Raid
lewis shobbrook schrieb:
> Hi All,
> I'm wondering if anyone has discovered any nice tricks to assist in
> identification of hdd devices.
> I have an 8 bay hotswap array, pretty lights and have been wondering
> what others out there might be doing to determine which disk in an
> array is which.
Considering you can see HDD LEDs blinking, something like:
dd if=/dev/sdb of=/dev/null
should help you identify the disk :)
--
Tomasz Chmielewski
http://wpkg.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: Identify SATA Disks
2007-05-23 23:29 ` Fwd: Identify SATA Disks lewis shobbrook
` (2 preceding siblings ...)
2007-05-24 16:19 ` Tomasz Chmielewski
@ 2007-05-24 21:00 ` Gabor Gombas
3 siblings, 0 replies; 5+ messages in thread
From: Gabor Gombas @ 2007-05-24 21:00 UTC (permalink / raw)
To: lewis shobbrook; +Cc: Linux-Raid
On Thu, May 24, 2007 at 09:29:04AM +1000, lewis shobbrook wrote:
> I've noted that device allocation can change with the generation of
> new initrd's and installation of new kernels; i.e. /dev/sdc becomes
> /dev/sda depending upon what order the modules load etc.
> I'm wondering if one could send a looped read/write task to a swap
> partition or something to determine which the device is?
If you're using a relatively modern distro with udev then you can use
paths under /dev/disk/by-{id,path}. Unless you're using a RAID card that
hides the disk IDs...
> Also I've not had much joy in attempting to "hotswap" SATA on a live
> system.
> Can anyone attest to successful hotswap (or blanket rule out as
> doesn't work) using std on board SATA controllers, cf dedicated raid
> card, or suggest further reading?
Make sure you have a chipset that supports hotplug (some older ones do
not). Make sure its driver supports hotplug. Make sure you stop using
the disk before pulling it out (umount, swapoff, mdadm --remove,
pvremove whatever). Power down the disk before pulling it out if your
backplane/enclosure does not do that for you. Then it should work.
If the chipset does not support sending interrupt on hotswap or if the
driver does not implement hotswap signalling, you may need explicit
"scsiadd -r" before yanking out the old drive and "scsiadd -s" after
inserting the new one.
Also remember that this area is rather new and still evolving, so be
sure to try the latest kernel if you encounter problems.
Gabor
--
---------------------------------------------------------
MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
---------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread