LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-13-2007, 04:37 AM   #1
cdcshu
Member
 
Registered: Jul 2006
Location: Shanghai
Distribution: Fedora, OpenSUSE
Posts: 31

Rep: Reputation: 16
Questions on Disk Vendor Identification


Hello,

I am now writing a program to tell different vendors among lot of disks. SCSI Command INQUIRY 0x83 VPD page could tell me sth like "Product identification: ST3160812AS". However, the same Vendor has a lot of product model. So it should be required to add almost every disk model in my check list to see whether a strang disk belongs to or not. Is there any other smart way/info help me identify disk vendor efficiently?

I need to set up such a list for Available Vendor List(AVL).

Thanks in advance,

cdcshu
 
Old 07-13-2007, 10:25 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Did you try just:

cat /proc/scsi/scsi
 
Old 07-15-2007, 09:18 PM   #3
cdcshu
Member
 
Registered: Jul 2006
Location: Shanghai
Distribution: Fedora, OpenSUSE
Posts: 31

Original Poster
Rep: Reputation: 16
Still no luck...

Hello macemoneta,

Thanks. However, it just spit out the same info as INQUIRY does.
No obvious vendor name found.

[root@cdcshu ~]# cat /proc/scsi/scsi
Attached devices:
......
Host: scsi0 Channel: 00 Id: 02 Lun: 00
Vendor: ATA Model: ST3160812AS Rev: E
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 13 Lun: 00
Vendor: ATA Model: ST3160812AS Rev: E
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 17 Lun: 00
Vendor: ATA Model: HDS725050KLA360 Rev: AH0A
Type: Direct-Access ANSI SCSI revision: 05
[root@cdcshu ~]#

In above last two disks, both are addressed as ATA as vendor name. Actually, ST3160812AS is from Seagate and HDS725050KLA360 Hitachi.

Thanks again,

cdcshu
 
Old 07-15-2007, 09:25 PM   #4
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Your vendor hasn't included the information, it can't be retrieved.

Code:
$ cat /proc/scsi/scsi 
Attached devices:
Host: scsi18 Channel: 00 Id: 00 Lun: 00
  Vendor: HL-DT-ST Model: DVDRAM GSA-5163D Rev: A104
  Type:   CD-ROM                           ANSI SCSI revision: 02
Host: scsi19 Channel: 00 Id: 00 Lun: 00
  Vendor: WDC WD16 Model: 00BB-00GUA0      Rev:     
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi20 Channel: 00 Id: 00 Lun: 00
  Vendor: SAMSUNG  Model: SP1604N          Rev: TM10
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi21 Channel: 00 Id: 00 Lun: 00
  Vendor: Maxtor   Model: 5000DV v01.00.00 Rev: 0100
  Type:   Direct-Access                    ANSI SCSI revision: 02
 
Old 07-15-2007, 09:34 PM   #5
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
#lshw -class disk
*-disk
description: ATA Disk
product: ST3300622A
vendor: Seagate
physical id: 0
bus info: ide@0.0
logical name: /dev/hda
version: 3.AAH
serial: 4NF1ZL6E
size: 279GB
capabilities: ata dma lba iordy smart security pm partitioned partitioned:dos
configuration: mode=udma5 smart=on
 
Old 07-15-2007, 10:45 PM   #6
cdcshu
Member
 
Registered: Jul 2006
Location: Shanghai
Distribution: Fedora, OpenSUSE
Posts: 31

Original Poster
Rep: Reputation: 16
lshw???

Hello 2damncommon,

I wonder where you got the nice command "lshw -class disk". There is no such command "lshw" on my machine. Besides, does it work for SCSI Disk as well?

Thanks,

cdcshu
 
Old 07-15-2007, 10:55 PM   #7
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
You can use:

hdparm -i /dev/hda

or

sdparm --all /dev/sda

sdparm is available from the fedora repo and is for scsi drives. With the kernel change (f7) treating all drives as sda type, I would imagine the hdparm will be phased out or absorbed by sdparm.

Lazlow
 
Old 07-15-2007, 10:55 PM   #8
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The lshw command is available in many distribution repositories. For Fedora Core 6, it's here.
 
Old 07-15-2007, 10:58 PM   #9
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by cdcshu
Hello 2damncommon,

I wonder where you got the nice command "lshw -class disk". There is no such command "lshw" on my machine. Besides, does it work for SCSI Disk as well?

Thanks,

cdcshu
It is on Ubuntu. For some reason I thought you were using Ubuntu when I posted it but I see now that is not so.
There are a couple hardware detection tools available to Linux.
Try an "apropos hardware" to check for installed programs or try searching for "hardware" in the package manager for not installed options.
Here is some info on lshw.
 
Old 07-16-2007, 01:19 AM   #10
cdcshu
Member
 
Registered: Jul 2006
Location: Shanghai
Distribution: Fedora, OpenSUSE
Posts: 31

Original Poster
Rep: Reputation: 16
I got lshw:-)

Hi 2damncommon,

I got the utility code and compiled on my PC. It did work for device tree list. However, I still cannot get any vendor info
in that.

# lshw -class disk
......
*-disk:12
description: SCSI Disk
product: ST3160812AS
vendor: ATA
physical id: 0.d.0
bus info: scsi@0:0.13.0
logical name: /dev/sdm
version: E
serial: 5LS44V7A
size: 149GB
capacity: 149GB
configuration: ansiversion=5
*-disk:13
description: SCSI Disk
product: HDS725050KLA360
vendor: ATA
physical id: 0.11.0
bus info: scsi@0:0.17.0
logical name: /dev/sdn
version: AH0A
serial: KRVN65ZAKLNXBF
size: 465GB
capacity: 465GB
configuration: ansiversion=5
...

Vendor name is still the same as other way as 'ATA'.

Thanks for all your help, anyway. Basically, I cannot get
the vendor name directly on the Server, I am afraid.

[root@cdcshu src]# uname -a
Linux cdcshu.u1.net 2.6.9-34.ELsmp #1 SMP Fri Feb 24 16:54:53 EST 2006 i686 i686 i386 GNU/Linux
[root@cdcshu src]#

cdcshu
 
Old 07-16-2007, 08:49 AM   #11
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
Then this would seem to be correct:
Quote:
Originally Posted by macemoneta
Your vendor hasn't included the information, it can't be retrieved.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux Certification: Vendor-Specific or Vendor Neutral LXer Syndicated Linux News 0 01-19-2007 09:33 AM
installed 2.6.13 from disk 2, now the questions Twister512 Slackware 4 11-21-2005 09:15 AM
hard disk questions mfeat Linux - Hardware 3 08-26-2004 10:04 AM
Disk Druid Questions Neo22589 Linux - General 3 04-03-2003 12:39 AM
two hard-disk setup questions jamaso Linux - Hardware 10 03-24-2003 12:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration