LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 01-25-2006, 12:01 PM   #1
tells
Member
 
Registered: Jun 2003
Location: Peoria, IL
Distribution: Ubuntu (home) / RHEL (work)
Posts: 65

Rep: Reputation: 15
How to list hard drive information.


My company was using EMC storage in the past. They provided a command called inq. This command would list each drive like /dev/sdb, the vendor, model of storage until, serial number, and drive size.

We have since switched to IBM storage, so I don't have access to the updated EMC commands anymore. I wanted to find a similar open source command or write a script to list out the same information.

Does anyone know of a similar command on RHEL linux?

I am also looking for a command in linux to list out the serial number of a scsi drive. If I can figure that out, I should be able to create a script to make the same output.
 
Old 01-25-2006, 01:08 PM   #2
Defi
LQ Newbie
 
Registered: Sep 2004
Posts: 9

Rep: Reputation: 0
hdparm -i /dev/...
df -h
 
Old 01-25-2006, 04:04 PM   #3
tells
Member
 
Registered: Jun 2003
Location: Peoria, IL
Distribution: Ubuntu (home) / RHEL (work)
Posts: 65

Original Poster
Rep: Reputation: 15
hdparm does not work on scsi drives
 
Old 01-25-2006, 04:17 PM   #4
tells
Member
 
Registered: Jun 2003
Location: Peoria, IL
Distribution: Ubuntu (home) / RHEL (work)
Posts: 65

Original Poster
Rep: Reputation: 15
I have made some progress. I found a package in RHEL 3 called sg3_utils which can give me most of the information I need. I have ran into one problem. We are also using virtualized storage and the serial number is the same for all the drives that are virtualized. If I have multiple drives with that are the same size with the same partition tables, does anyone know how to determine which paths point to the same drives since there is no serial number to go by? You can see what I mean below:

Device Serial Vendor Model Size(kb)
----------------------------------------------------------------
/dev/sdb 020060a026f8XX02 IBM 2145 31457280
/dev/sdc 020060a026f8XX02 IBM 2145 31457280
/dev/sdd 020060a026f8XX02 IBM 2145 31457280
/dev/sde 020060a026f8XX02 IBM 2145 3145728
/dev/sdf 020060a026f8XX02 IBM 2145 3145728
/dev/sdg 020060a026f8XX02 IBM 2145 31457280
/dev/sdh 020060a026f8XX02 IBM 2145 31457280
/dev/sdi 020060a026f8XX02 IBM 2145 31457280
/dev/sdj 020060a026f8XX02 IBM 2145 3145728
/dev/sdk 020060a026f8XX02 IBM 2145 3145728
/dev/sdl 020060a026f8XX02 IBM 2145 31457280
/dev/sdm 020060a026f8XX02 IBM 2145 31457280
/dev/sdn 020060a026f8XX02 IBM 2145 31457280
/dev/sdo 020060a026f8XX02 IBM 2145 3145728
/dev/sdp 020060a026f8XX02 IBM 2145 3145728
/dev/sdq 020060a026f8XX02 IBM 2145 31457280
/dev/sdr 020060a026f8XX02 IBM 2145 31457280
/dev/sds 020060a026f8XX02 IBM 2145 31457280
/dev/sdt 020060a026f8XX02 IBM 2145 3145728
/dev/sdu 020060a026f8XX02 IBM 2145 3145728

In this case I know the following drives match:
sdb, sdl, sdq, sdg (these are all the same drive)
sdc, sdr, sdm, sdh (these are all the same drive)
sdd, sds, sdn, sdi (these are all the same drive)
sde, sdt, sdo, sdj (these are all the same drive)
sdf, sdu, sdp, sdk (these are all the same drive)

Veritas Foundation Suite helped me determine which drives are the same but I want a solution for servers that are also not running Veritas. Any help on how to determine that sdb, sdl, sdq, and sdg are the same drive is what I am looking for.

The commands I used to get the information above are
sginfo -l (list all scsi devices)
sginfo -s /dev/sdX (list serial number of drive)
sginfo /dev/sdX (get vendor information)
fdisk -s /dev/sdX (get drive size)

Thanks,
 
Old 01-26-2006, 03:37 PM   #5
tells
Member
 
Registered: Jun 2003
Location: Peoria, IL
Distribution: Ubuntu (home) / RHEL (work)
Posts: 65

Original Poster
Rep: Reputation: 15
I did find another command to identy the drives, incase anyone else wants to do the same thing. There is a command called scsi_unique_id that did the trick. I now have a script that can list out all the drives, sizes, serial numbers and the paths each drive can use.
 
  


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
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
Grub to access new hard drive and old multi os hard drive ? gedi1 Linux - Hardware 0 06-03-2004 12:01 PM
SCSI Hard Drive Not On the List (Installing 10.0) tonylmiller Mandriva 5 05-17-2004 12:36 AM
hard drive information with command line Mugatu Linux - Newbie 3 01-08-2004 08:26 AM
hard drive information vanhalen Linux - Newbie 3 07-08-2002 07:28 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 06:15 PM.

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