You are not logged in.

#1 2011-02-03 21:49:52

Fackamato
Member
Registered: 2006-03-31
Posts: 579

How do I find which HDD it is?

Hi,

I ran a check on my RAID5 md array and got this in dmesg:

md: data-check of RAID array md0
md: minimum _guaranteed_  speed: 1000 KB/sec/disk.
md: using maximum available idle IO bandwidth (but not more than 200000 KB/sec) for data-check.
md: using 128k window, over a total of 1950351360 blocks.
ata4.00: exception Emask 0x0 SAct 0x202000 SErr 0x0 action 0x6 frozen
ata4.00: failed command: READ FPDMA QUEUED
ata4.00: cmd 60/38:68:00:00:2d/00:00:0e:00:00/40 tag 13 ncq 28672 in
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata4.00: status: { DRDY }
ata4.00: failed command: READ FPDMA QUEUED
ata4.00: cmd 60/00:a8:38:00:2d/04:00:0e:00:00/40 tag 21 ncq 524288 in
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata4.00: status: { DRDY }
ata4: hard resetting link
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: configured for UDMA/133
ata4.00: device reported invalid CHS sector 0
ata4.00: device reported invalid CHS sector 0
ata4: EH complete
EXT4-fs (dm-1): mounted filesystem with writeback data mode. Opts: nouser_xattr,data=writeback,stripe=384
nfsd: last server has exited, flushing export cache
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: starting 90-second grace period
md: md0: data-check done.

If I grep on ata4 I get:

ata4: SATA max UDMA/133 abar m8192@0xfae76000 port 0xfae76280 irq 40
ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata4.00: ATA-8: WDC WD20EARS-00MVWB0, 50.0AB50, max UDMA/133
ata4.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata4.00: configured for UDMA/133

The problem is, I have 4 of those harddrives. Is there a way (somewhere in sysfs?) I can find exactly which drive it is?

Cheers,

Offline

#2 2011-02-03 22:13:28

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: How do I find which HDD it is?

If your drives support SMART, you can try

# smartctl -i /dev/sda1

Together with lots of other info, it returns the drive serial number.  That should help assuming there a sticker containing that number somewhere on the case.
On my machine it looks like this

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 7200.10 family
Device Model:     ST3250310AS
Serial Number:    6RYAY6XV
Firmware Version: 3.ADA
.
.
.

Offline

#3 2011-02-03 22:37:52

Fackamato
Member
Registered: 2006-03-31
Posts: 579

Re: How do I find which HDD it is?

skunktrader wrote:

If your drives support SMART, you can try

# smartctl -i /dev/sda1

Together with lots of other info, it returns the drive serial number.  That should help assuming there a sticker containing that number somewhere on the case.
On my machine it looks like this

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 7200.10 family
Device Model:     ST3250310AS
Serial Number:    6RYAY6XV
Firmware Version: 3.ADA
.
.
.

Sure, that I can find out. But still, which disk is "ata4"? It's not mentioned in dmesg. I need to tie ata4 to a device (/dev/sd?).

Offline

#4 2011-02-04 09:08:07

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: How do I find which HDD it is?

You can check the smart logs for all the devices, one by one.

try

for i in `ls /dev/sd{a,b,c,d}` ; do smartctl -l error $i;done

This is assuming you have 4 disks. Otherwise, adjust /dev/sd{a,b,c,d} accordingly.

If there is a smart error for any of the disks, then that is the culprit. If no error shows up, then i am afraid, i don't know how you can recognize the disk.

Offline

Board footer

Powered by FluxBB