I tried to find the harddisk information using the command hdparm -i /dev/sda. But I couldn't get the info. Is there any similar command to find the harddisk serial number.
The uppercase -I switch yields much more information:
hdparm -I /dev/sda | awk '/Serial Number/{print $1" "$2" "$3}'
The below error message I got.
hdparm -I /dev/sda | awk '/Serial Number/{print $1" "$2" "$3}'
HDIO_DRIVE_CMD(identify) failed: Invalid argument
Also, I tried to install the sdparm though its a scsi disk and got the below output with no clue.
l] or <start_byte>:<start_bit>:<num_bits>[=val].
[root@smasitappl001 /]# sdparm -i /dev/sda
/dev/sda: IBM ServeRAID M5014 2.12
Device identification VPD page:
Addressed logical unit:
designator type: NAA, code set: Binary
0x600605b00421fea016dea3960da06464
Usually you have to use something specific from the RAID manufacturer to see through the RAID to the individual drives. For example: Installing ServeRAID Manager
You can also get some information from /sys in linux:
$ cat /sys/class/block/sda/device/model
ST3160812AS
$
That may not include the serial number however.
I have a different /sys hierarchy than Corona688 and I see no serial number in /sys. I can get the serial with the hdparm command though.
#
# cat /sys/block/sda/device/model
WDC WD800JD-75MS
# hdparm -I /dev/sda | awk '/Serial Number/{print $1" "$2" "$3}'
Serial Number: WD-WMAM9TM63898
#