LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Serial Numbers for SAS drives in RedHat ES 4.0 & 5.1 (https://www.linuxquestions.org/questions/linux-hardware-18/serial-numbers-for-sas-drives-in-redhat-es-4-0-and-5-1-a-672349/)

QuietLeni 09-25-2008 01:06 PM

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

farslayer 09-25-2008 03:45 PM

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..

QuietLeni 09-29-2008 08:27 AM

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?

farslayer 09-29-2008 10:22 AM

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..

jiml8 09-29-2008 10:30 AM

smartctl -a

farslayer 09-29-2008 11:16 AM

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...

QuietLeni 09-30-2008 11:37 AM

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?

farslayer 09-30-2008 03:58 PM

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.

LearLear 02-19-2013 05:52 AM

Quote:

Originally Posted by farslayer (Post 3296344)
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?


All times are GMT -5. The time now is 10:43 AM.