Re: Possible HDD error, how do I find which HDD it is?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19/02/2011 16:44, Phil Turmel wrote:
On 02/19/2011 10:37 AM, John Robinson wrote:
On 19/02/2011 11:52, Mathias BurÃn wrote:
[...]
What I wonder is, how do I know what device is ata3? I do have 4
devices of that model (WD20EARS). I've tried searching in /sys but
there's nothing of value there (or I've missed it). If dmesg only
showed the S/N...
I posted the smartctl --all output of all devices here in case someone
has time to take a look:
http://stuff.dyndns.org/logs/smart-sd[a,b,c,d,e,f,g].log

Try using Phil Turmel's excellent lsdrv script; I've attached the version I use on EL5, but I hacked it about to work on such an old distro so I wouldn't swear it will work on more recent distros; Phil's original that does work on more recent distros can be found in the list archives around 6 November last year in the thread "Determining which spindle is out of order".

I've attached the latest version.  It falls back to smartctl if it can't find the sginfo utility.  It should work on both old and new sysfs layouts.

It still lists nothing on EL5. My SCSI hosts appear in /sys/devices/ as follows:

/sys/devices/pci0000:00/0000:00:1f.2/host7/scsi_host:host7
/sys/devices/pci0000:00/0000:00:1f.2/host6/scsi_host:host6
/sys/devices/pci0000:00/0000:00:1f.2/host5/scsi_host:host5
/sys/devices/pci0000:00/0000:00:1f.2/host4/scsi_host:host4
/sys/devices/pci0000:00/0000:00:1f.2/host3/scsi_host:host3
/sys/devices/pci0000:00/0000:00:1f.2/host2/scsi_host:host2
/sys/devices/pci0000:00/0000:00:1e.0/0000:05:01.1/host9/scsi_host:host9
/sys/devices/pci0000:00/0000:00:1e.0/0000:05:01.0/host8/scsi_host:host8
/sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/host1/scsi_host:host1
/sys/devices/pci0000:00/0000:00:1c.4/0000:03:00.0/host0/scsi_host:host0

So I changed the find regex as follows:

find /sys/devices/ -regex '.+/scsi_host\(:block\|:host[0-9]+\)?'

though I'd be interested to know why the simpler:

find /sys/devices/ -name 'scsi_host*'

isn't sufficient?

Cheers,

John.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux