2001-10-31 00:52:39

by Mark Atwood

[permalink] [raw]
Subject: Identify IDE device?


Is there a way, via an ioctl call, or something to identify what
specific IDE hard disk or other IDE device is hooked up to the IDE
controller?

I'm really hoping to be able to determine something like "/dev/hda is
a Maxtor 96147H6".

--
Mark Atwood | I'm wearing black only until I find something darker.
[email protected] | http://www.pobox.com/~mra


2001-10-31 01:12:40

by Christian Borntraeger

[permalink] [raw]
Subject: Re: Identify IDE device?

Am Mittwoch, 31. Oktober 2001 01:52 schrieb Mark Atwood:
> Is there a way, via an ioctl call, or something to identify what
> specific IDE hard disk or other IDE device is hooked up to the IDE
> controller?

What about

cat /proc/ide/hda/model


greetings

Christian Borntr?ger

2001-10-31 01:46:31

by Dave Jones

[permalink] [raw]
Subject: Re: Identify IDE device?

On 30 Oct 2001, Mark Atwood wrote:

> Is there a way, via an ioctl call, or something to identify what
> specific IDE hard disk or other IDE device is hooked up to the IDE
> controller?

HDIO_GET_IDENTITY is the ioctl you seek.

Grab the hdparm source for an example of how to use this and other
IDE related ioctls.

regards,

Dave.

--
| Dave Jones. http://www.codemonkey.org.uk
| SuSE Labs

2001-10-31 10:13:53

by Timo Jantunen

[permalink] [raw]
Subject: Re: Identify IDE device?

On 30 Oct 2001, Mark Atwood wrote:

> Is there a way, via an ioctl call, or something to identify what
> specific IDE hard disk or other IDE device is hooked up to the IDE
> controller?
>
> I'm really hoping to be able to determine something like "/dev/hda is
> a Maxtor 96147H6".

Something like
---cut
12:12:17 limbo ~$ cat /proc/ide/hd?/model
IC35L040AVER07-0
IBM-DTLA-307030
TOSHIBA DVD-ROM SD-M1212
CR-4804TE
12:12:19 limbo ~$
---cut
?


// /
....................................Timo Jantunen ......................
ZZZ (Used to represent :Kuuns?de 8 A 28: Email: [email protected] :
the sound of a person snoring.) :02210 Espoo : http://iki.fi/jeti :
Webster's Encyclopedic Unabridged :Finland : GSM+358-40-5763131 :
Dictionary of the English Language :...............:....................:

2001-10-31 11:45:10

by Stefan Smietanowski

[permalink] [raw]
Subject: Re: Identify IDE device?

Hi!

> Is there a way, via an ioctl call, or something to identify what
> specific IDE hard disk or other IDE device is hooked up to the IDE
> controller?
>
> I'm really hoping to be able to determine something like "/dev/hda is
> a Maxtor 96147H6".
>
>

hdparm -i /dev/hda

// Stefan