LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 09-25-2008, 01:06 PM   #1
QuietLeni
LQ Newbie
 
Registered: Sep 2008
Location: South East England
Distribution: Red Hat
Posts: 11

Rep: Reputation: 0
Smile Serial Numbers for SAS drives in RedHat ES 4.0 & 5.1


Dear All,

I've got a bit of a problem - I have to inventory a number of IBM HS21 RedHat Linux ES 4.0 and 5.1 servers and I have to get the Physical Hard Disk serial numbers.

Before anyone jumps down my throat and shouts "Hey, Stupid, you haven't been searching properly, use /sbin/hdparm -i /dev/hda1", there are a couple of curve balls - The drives are SAS drives. The drives have been hardware mirrored and then then split into two partitions - sda1 and sda2. Hdparm just outputs that the device path and that is it.

Does anyone know how to get the Physical Serial number for both drives?

Any help would be gratefully received.

Regards,


QuietLeni
 
Old 09-25-2008, 03:45 PM   #2
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Is there a utility available from the manufacturer of your RAID controller ?
The RAID management utility should be able to query that info for you. You didn't post the Controller info though..

If that's a LSI controller check out the Megaraid Storage Manager for Linux for example..

and besides I would have suggested lshw as a single command to get all the serial numbers but you are right that would not work with your configuration..

Last edited by farslayer; 09-25-2008 at 03:50 PM.
 
Old 09-29-2008, 08:27 AM   #3
QuietLeni
LQ Newbie
 
Registered: Sep 2008
Location: South East England
Distribution: Red Hat
Posts: 11

Original Poster
Rep: Reputation: 0
Unhappy LSI 1063e RAID Controller

Good News: It *IS* an LSI Controller - the 1063E, to be exact, but...
Bad News: We are not installing any special controller driver (so I can't query the controller using a Controller Utility).

:-(

Any other ideas?
 
Old 09-29-2008, 10:22 AM   #4
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
it's not a driver, you already have the driver installed. it's a management utility to view information about the array. it can provide information about the array health, drive health, status, etc..

You are using a Hardware RAID controller, and if you can't install the utility, provided by the manufacturer of the controller to manage it, then I guess you are hosed..
 
Old 09-29-2008, 10:30 AM   #5
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
smartctl -a
 
Old 09-29-2008, 11:16 AM   #6
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
smartctl is an interesting idea if it supports his controller... hrm..


Quote:
mail:~# mount
/dev/cciss/c0d0p2 on / type ext3 (rw,errors=remount-ro)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
/dev/cciss/c0d0p5 on /home type ext3 (rw)
/dev/cciss/c0d0p9 on /opt type ext3 (rw)
/dev/cciss/c0d0p6 on /tmp type ext3 (rw)
/dev/cciss/c0d0p7 on /usr type ext3 (rw)
/dev/cciss/c0d0p8 on /var type ext3 (rw)

mail:~# smartctl -a
ERROR: smartctl requires a device name as the final command-line argument.


mail:~# smartctl --all -d=cciss,1 /dev/cciss/c0d0p1

=======> INVALID ARGUMENT TO -d: =cciss
=======> VALID ARGUMENTS ARE: ata, scsi, marvell, 3ware,N, cciss,N <=======
/dev/cciss/c0d0p1 is made up of 4 sas drives attached to an HP Hardware RAID controller.

The number after the device is the specific drive in the array..

Quote:
mail:~# smartctl --all -d cciss,1 /dev/cciss/c0d0p1
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: HP DG072A8B54 Version: HPD7
Serial number: 3LB14HEV000097150123
Device type: disk
Transport protocol: SAS
Local Time is: Mon Sep 29 11:42:03 2008 EDT
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

Current Drive Temperature: 27 C
Drive Trip Temperature: 65 C
Elements in grown defect list: 0
Vendor (Seagate) cache information
Blocks sent to initiator = 1901524596
Blocks received from initiator = 2077283369
Blocks read from cache and sent to initiator = 158319535
Number of read and write commands whose size <= segment size = 3577453998
Number of read and write commands whose size > segment size = 0
Vendor (Seagate/Hitachi) factory information
number of hours powered up = 13590.75
number of minutes until next internal SMART test = 88

Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 0 0 0 0 0 0.000 0
write: 0 0 0 0 0 0.000 0

Non-medium error count: 0
No self-tests have been logged
Long (extended) Self Test duration: 1560 seconds [26.0 minutes]



mail:~# smartctl --all -d cciss,2 /dev/cciss/c0d0p1
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: HP DG072A8B54 Version: HPD7
Serial number: 3LB19PQP00009719EFGH
Device type: disk
Transport protocol: SAS
Local Time is: Mon Sep 29 11:46:23 2008 EDT
Device supports SMART and is Enabled
Temperature Warning Enabled
SMART Health Status: OK

Current Drive Temperature: 26 C
Drive Trip Temperature: 65 C
Elements in grown defect list: 0
Vendor (Seagate) cache information
Blocks sent to initiator = 2046307120
Blocks received from initiator = 2317748466
Blocks read from cache and sent to initiator = 135839763
Number of read and write commands whose size <= segment size = 3580358112
Number of read and write commands whose size > segment size = 0
Vendor (Seagate/Hitachi) factory information
number of hours powered up = 13581.18
number of minutes until next internal SMART test = 120

Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 0 0 0 0 0 0.000 0
write: 0 0 0 0 0 0.000 0

Non-medium error count: 2
No self-tests have been logged
Long (extended) Self Test duration: 1560 seconds [26.0 minutes]
Looks like I learned something too, I was unaware that smartctl could query the individual drives in a hardware array like that. Color me corrected...

Last edited by farslayer; 09-29-2008 at 11:23 AM.
 
Old 09-30-2008, 11:37 AM   #7
QuietLeni
LQ Newbie
 
Registered: Sep 2008
Location: South East England
Distribution: Red Hat
Posts: 11

Original Poster
Rep: Reputation: 0
Question Works... almost!

Thanks guys, I am almost there (sort of)...

smartctl *DOES* work properly on RedHat ES 5.1 (version 5.36), but the version on RedHat ES 4.0 is version 5.15.

I seem not to get any information for my drives at all on 4.0. Can I copy the smartctl from 5.1 into my temporary directory and then run it instead of the native version on 4.0 or is this specific to 5.1?

Lastly, I need to be able to ascertain which item I find in the mount output to plug into smartctl to get the details of my Physical Disk. I am currently looking for the device that is "on /boot" and then piping this into the smartctl command. This is not very generic, as I want to find all of the Physical Disks. Is there a way of finding the physical disks as well?
 
Old 09-30-2008, 03:58 PM   #8
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,231
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
well the first thing you need to know is the driver for your controller. smartctl gave me the options of ata, scsi, marvell, 3ware,N, cciss,N and my controller uses the cciss driver, so that is the one I had to specify in the command. I don't know if these ar the only drivers that are supported, or if cciss was there because it is loaded and running on my system. Tthose options may change depending on the loaded drivers in your system.....

if you have a LSI controller your driver would be one of the following most likely.. mptsas megasas megasr
You should be able to see one of these when you look at the output of lsmod

fdisk -l should show you the logical drives so you can use that in your smartctl statement i.e: /dev/sda or some such..

mount should show you what device /boot is on


At this point without knowing more info all I can do is guess, and my psychic powers are poor if not entirely non-existent

smartctl --all -d mptsas,0 /dev/sda1
smartctl --all -d mptsas,1 /dev/sda1
smartctl --all -d mptsas,2 /dev/sda1
smartctl --all -d mptsas,3 /dev/sda1
smartctl --all -d mptsas,4 /dev/sda1
smartctl --all -d mptsas,5 /dev/sda1


that would be for 6 drives, using the mptsas driver and a device ID of /dev/sda...


I don't think the version of smartctl matters too much, so I wouldn't worry about that right now.
 
Old 02-19-2013, 05:52 AM   #9
LearLear
LQ Newbie
 
Registered: Feb 2013
Posts: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by farslayer View Post
well the first thing you need to know is the driver for your controller. smartctl gave me the options of ata, scsi, marvell, 3ware,N, cciss,N and my controller uses the cciss driver, so that is the one I had to specify in the command. I don't know if these ar the only drivers that are supported, or if cciss was there because it is loaded and running on my system. Tthose options may change depending on the loaded drivers in your system.....

if you have a LSI controller your driver would be one of the following most likely.. mptsas megasas megasr
You should be able to see one of these when you look at the output of lsmod

fdisk -l should show you the logical drives so you can use that in your smartctl statement i.e: /dev/sda or some such..

mount should show you what device /boot is on


At this point without knowing more info all I can do is guess, and my psychic powers are poor if not entirely non-existent

smartctl --all -d mptsas,0 /dev/sda1
smartctl --all -d mptsas,1 /dev/sda1
smartctl --all -d mptsas,2 /dev/sda1
smartctl --all -d mptsas,3 /dev/sda1
smartctl --all -d mptsas,4 /dev/sda1
smartctl --all -d mptsas,5 /dev/sda1


that would be for 6 drives, using the mptsas driver and a device ID of /dev/sda...


I don't think the version of smartctl matters too much, so I wouldn't worry about that right now.
sorry, my english is terrible, but i mean there's no cciss on mount. I just want to get the SAS address by smartctl,how?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Very Poor Disk Performance SAS 15000 RPM Drives JustinK101 Linux - Newbie 4 07-02-2008 07:57 PM
File serial numbers exvor Programming 4 07-20-2007 04:57 PM
How to get serial numbers? G00fy Programming 8 07-19-2007 03:04 PM
SAS & partitioning of disks rblampain Linux - General 2 05-14-2007 06:48 AM
No Drives found with Proliant ML 310 G4 with SAS on RHEL4 dambert Linux - Hardware 3 02-08-2007 09:05 AM


All times are GMT -5. The time now is 08:01 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration