How to Find Out Hard Disks Serial/Model Number, Disk Size, SATA Type
November 11 2014
Can see the serial or model number of your hard disks from the terminal, the below commands are get information lshw, lsblk, hdparm, smartctl, palimpsest.
lshw (Hardware Lister)
# lshw -class disk
*-disk
description: ATA Disk
product: ST500LM012 HN-M5
vendor: Seagate
physical id: 0.0.0
bus info: scsi@0:0.0.0
logical name: /dev/sda
version: 2AR1
serial: S2RSJ9DCA02798
size: 465GiB (500GB)
capabilities: partitioned partitioned:dos
configuration: ansiversion=5 sectorsize=4096 signature=00079661
*-cdrom
description: DVD-RAM writer
product: DVD-RAM UJ8D1
vendor: MATSHITA
physical id: 0.1.0
bus info: scsi@0:0.1.0
logical name: /dev/cdrom
logical name: /dev/sr0
version: L.01
capabilities: removable audio cd-r cd-rw dvd dvd-r dvd-ram
configuration: ansiversion=5 status=nodisc
Find out disk name only:
# lshw -short -C disk
H/W path Device Class Description
======================================================
/0/1/0.0.0 /dev/sda disk 500GB ST500LM012 HN-M5
/0/1/0.1.0 /dev/cdrom disk DVD-RAM UJ8D1
If you could not found the command try to install using yum or apt-get
# lshw -class disk
-bash: lshw: command not found
If you dont have the lshw command just install using yum command
# apt-get install lshw*
# yum install lshw*
# yum install lshw*
...
Dependencies Resolved
===========================================
Package Arch Version Repository Size
============================================
lshw i386 2.15-1.el5.rf rpmforge 1.4 M
lshw-gui i386 2.15-1.el5.rf rpmforge 417 k
===============================================
Total download size: 1.8 M
Is this ok [y/N]: y
...
Installed: lshw.i386 0:2.15-1.el5.rf lshw-gui.i386 0:2.15-1.el5.rf
Complete!
lsblk
lsblk is used to get infroamtion about all block devices and it not shows infromation about RAM.
# yum install util-linux-ng
# apt-get install util-linux-ng
# apt-get install util-linux-ng
List out block device like model,kname,size and type,
# lsblk -io MODEL,KNAME,SIZE,TYPE
MODEL KNAME SIZE TYPE
ST500LM012 HN-M5 sda 465.8G disk
sda1 464G part
sda2 1K part
sda5 1.8G part
DVD-RAM UJ8D1 sr0 1024M rom
or
# cat /proc/partitions
major minor #blocks name
8 0 488386584 sda
8 1 486511616 sda1
8 2 1 sda2
8 5 1871872 sda5
11 0 1048575 sr0
hdparm
Hdparm is used to check the hard drive read and writing speed.
Redhat/CentOS
# yum install hdparm -y
Ubuntu/Debian
# apt-get install hdparm -y
Show harddisk details like Model/Serial number, configuration, Capabilities, features.
# hdparm -I /dev/sda
/dev/sda:
ATA device, with non-removable media
Model Number: ST500LM012 HN-M500MBB
Serial Number: S2RSJ9DCA02798
Firmware Revision: 2AR10002
Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
Used: unknown (minor revision code 0x0028)
Supported: 8 7 6 5
Likely used: 8
Configuration:
Logical max current
cylinders 16383 16383
heads 16 1
sectors/track 63 63
--
CHS current addressable sectors: 1032129
LBA user addressable sectors: 268435455
LBA48 user addressable sectors: 976773168
Logical Sector size: 512 bytes
Physical Sector size: 4096 bytes
Logical Sector-0 offset: 0 bytes
device size with M = 1024*1024: 476940 MBytes
device size with M = 1000*1000: 500107 MBytes (500 GB)
cache/buffer size = 8192 KBytes
Form Factor: 2.5 inch
Nominal Media Rotation Rate: 5400
Capabilities:
LBA, IORDY(can be disabled)
Queue depth: 32
Standby timer values: spec'd by Standard, no device specific minimum
R/W multiple sector transfer: Max = 16 Current = 16
Advanced power management level: 128
Recommended acoustic management value: 254, current value: 128
DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
Cycle time: min=120ns recommended=120ns
PIO: pio0 pio1 pio2 pio3 pio4
Cycle time: no flow control=120ns IORDY flow control=120ns
Commands/features:
Enabled Supported:
* SMART feature set
Security Mode feature set
* Power Management feature set
* Write cache
* Look-ahead
* Host Protected Area feature set
* WRITE_BUFFER command
* READ_BUFFER command
* NOP cmd
* DOWNLOAD_MICROCODE
* Advanced Power Management feature set
Power-Up In Standby feature set
* SET_FEATURES required to spinup after power up
SET_MAX security extension
* Automatic Acoustic Management feature set
* 48-bit Address feature set
* Device Configuration Overlay feature set
* Mandatory FLUSH_CACHE
* FLUSH_CACHE_EXT
* SMART error logging
* SMART self-test
* General Purpose Logging feature set
* 64-bit World wide name
* IDLE_IMMEDIATE with UNLOAD
* WRITE_UNCORRECTABLE_EXT command
* {READ,WRITE}_DMA_EXT_GPL commands
* Segmented DOWNLOAD_MICROCODE
* Gen1 signaling speed (1.5Gb/s)
* Gen2 signaling speed (3.0Gb/s)
* Native Command Queueing (NCQ)
* Host-initiated interface power management
* Phy event counters
* Idle-Unload when NCQ is active
* NCQ priority information
DMA Setup Auto-Activate optimization
Device-initiated interface power management
* Software settings preservation
* SMART Command Transport (SCT) feature set
* SCT Read/Write Long (AC1), obsolete
* SCT Write Same (AC2)
* SCT Error Recovery Control (AC3)
* SCT Features Control (AC4)
* SCT Data Tables (AC5)
Security:
Master password revision code = 65534
supported
not enabled
not locked
frozen
not expired: security count
supported: enhanced erase
104min for SECURITY ERASE UNIT. 104min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50004cf2088fd241
NAA : 5
IEEE OUI : 0004cf
Unique ID : 2088fd241
Checksum: correct
smartctl
Install smartctl command,
# apt-get install smartmontools
# smartctl -d ata -a -i /dev/sda
# smartctl -d ata -a -i /dev/sda
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
lib32z1 libc6-i386
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
heirloom-mailx
Suggested packages:
exim4 mail-transport-agent gsmartcontrol smart-notifier
Recommended packages:
mailx mailutils
The following NEW packages will be installed:
heirloom-mailx smartmontools
0 upgraded, 2 newly installed, 0 to remove and 53 not upgraded.
Need to get 693 kB of archives.
After this operation, 2,168 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu/ trusty/universe heirloom-mailx amd64 12.5-2 [247 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ trusty/main smartmontools amd64 6.2+svn3841-1.2 [445 kB]
Fetched 693 kB in 6s (103 kB/s)
Selecting previously unselected package heirloom-mailx.
(Reading database ... 184903 files and directories currently installed.)
Preparing to unpack .../heirloom-mailx_12.5-2_amd64.deb ...
Unpacking heirloom-mailx (12.5-2) ...
Selecting previously unselected package smartmontools.
Preparing to unpack .../smartmontools_6.2+svn3841-1.2_amd64.deb ...
Unpacking smartmontools (6.2+svn3841-1.2) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Setting up heirloom-mailx (12.5-2) ...
update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode
Setting up smartmontools (6.2+svn3841-1.2) ...
Processing triggers for ureadahead (0.100.0-16) ...
root@laks:/dev/disk# smartctl -d ata -a -i /dev/sda
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-37-generic] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Momentus SpinPoint M8 (AF)
Device Model: ST500LM012 HN-M500MBB
Serial Number: S2RSJ9DCA02798
LU WWN Device Id: 5 0004cf 2088fd241
Firmware Version: 2AR10002
User Capacity: 500,107,862,016 bytes [500 GB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 6
SATA Version is: SATA 3.0, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Mon Nov 10 16:53:18 2014 IST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 6480) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 108) minutes.
SCT capabilities: (0x003f) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 100 100 051 Pre-fail Always - 4
2 Throughput_Performance 0x0026 252 252 000 Old_age Always - 0
3 Spin_Up_Time 0x0023 091 091 025 Pre-fail Always - 2857
4 Start_Stop_Count 0x0032 097 097 000 Old_age Always - 3125
5 Reallocated_Sector_Ct 0x0033 252 252 010 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 252 252 051 Old_age Always - 0
8 Seek_Time_Performance 0x0024 252 252 015 Old_age Offline - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 4093
10 Spin_Retry_Count 0x0032 252 252 051 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 10
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 885
191 G-Sense_Error_Rate 0x0022 100 100 000 Old_age Always - 210
192 Power-Off_Retract_Count 0x0022 252 252 000 Old_age Always - 0
194 Temperature_Celsius 0x0002 051 042 000 Old_age Always - 49 (Min/Max 22/58)
195 Hardware_ECC_Recovered 0x003a 100 100 000 Old_age Always - 0
196 Reallocated_Event_Count 0x0032 252 252 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 252 252 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 252 252 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0036 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x002a 100 100 000 Old_age Always - 2339
223 Load_Retry_Count 0x0032 100 100 000 Old_age Always - 10
225 Load_Cycle_Count 0x0032 099 099 000 Old_age Always - 10777
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 0
Note: revision number not 1 implies that no selective self-test has ever been run
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Completed [00% left] (0-65535)
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
palimpsest:
Also, graphically view disk utility by palimpsest command,
# apt-get install gnome-disk-utility
Run it from a terminal
# palimpsest
Comments (0)