Linux 查看硬盘信息

好风 发表于 2016-11-28T14:32:32.354041Z
引用地址:https://plus.ooclab.com/note/article/1306

Linux 下如何查看硬盘设备信息

Tools

hdparm

SMART

smartctl --all /dev/sdb

lshw

lshw -class disk -class storage

lsblk

lsscsi

# lsscsi 
[0:0:0:0]    disk    ATA      Samsung SSD 850  2B6Q  /dev/sda 
[1:0:0:0]    disk    ATA      WDC WD30EFRX-68E 0A80  /dev/sdb 
[2:0:0:0]    disk    ATA      ST3000DM001-1ER1 CC26  /dev/sdc 
[3:0:0:0]    disk    ATA      WDC WD30EZRZ-22Z 0A80  /dev/sdd

常见操作

测试硬盘速度

# hdparm -tT /dev/sdb

/dev/sdb:
 Timing cached reads:   18050 MB in  2.00 seconds = 9032.58 MB/sec
 Timing buffered disk reads: 460 MB in  3.00 seconds = 153.11 MB/sec

查看硬盘转速

# smartctl --all /dev/sdb | grep 'Rotation Rate'
Rotation Rate:    5400 rpm

查看硬盘通电时间

# smartctl -A /dev/sdb | grep Power_On_Hours
  9 Power_On_Hours          0x0032   089   089   000    Old_age   Always       -       8746

/dev/sdb 通电 8746 小时