Press "Enter" to skip to content

Ubuntu系统下查看硬盘信息

Ubuntu系统下查看硬盘信息的方法,可以查看到硬盘的型号、序列号、接口类型,转速,缓存等,这里记录一下。

方法一:直接通过内核查看

$ cat /sys/block/sda/device/model
ST31000524AS

$ cat /sys/block/sda/device/vendor 
ATA

方法二:用过hdparm命令查看

$ sudo hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
	Model Number:       ST31000524AS                            
	Serial Number:      9VPF38YC
	Firmware Revision:  JC45    
	Transport:          Serial, SATA Rev 3.0
Standards:
	这里省略大量信息
Configuration:
	Logical		max	current
	cylinders	16383	16383
	heads		16	16
	sectors/track	63	63
	--
	CHS current addressable sectors:   16514064
	LBA    user addressable sectors:  268435455
	LBA48  user addressable sectors: 1949396401
	Logical/Physical Sector size:           512 bytes
	device size with M = 1024*1024:      951853 MBytes
	device size with M = 1000*1000:      998090 MBytes (998 GB)
	cache/buffer size  = unknown
	Nominal Media Rotation Rate: 7200
Capabilities:
	LBA, IORDY(can be disabled)
	这里省略大量信息
Commands/features:
	Enabled	Supported:
	   *	SMART feature set
	    	Security Mode feature set
	   *	这里省略大量信息
	   *	SCT Data Tables (AC5)
Security: 
	Master password revision code = 65534
		supported
	not	enabled
	not	locked
		frozen
	not	expired: security count
		supported: enhanced erase
	164min for SECURITY ERASE UNIT. 164min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000c5003fc5c146
	NAA		: 5
	IEEE OUI	: 000c50
	Unique ID	: 03fc5c146
Checksum: correct


可以发现,通过这种方法,看到的信息很全面,连硬盘型号,序列号,容量,接口,转速全都看到了。

方法三:通过lsscsi工具查看

$ sudo aptitude install lsscsi

$ lsscsi --device
[0:0:0:0]    disk    ATA      ST31000524AS     JC45  /dev/sda[8:0]
[4:0:0:0]    cd/dvd  ATAPI    DVD A  DH16ABS   PC21  /dev/sr0[11:0]

$ lsscsi --list
这里省略大量信息

方法四:通过scsitools工具查看

$ sudo aptitude install scsitools

$ sudo scsiinfo -l
/dev/sda

$ sudo scsiinfo -c /dev/sda
Data from Caching Page
----------------------
Write Cache                        1
Read Cache                         1
Prefetch units                     0
Demand Read Retention Priority     0
Demand Write Retention Priority    0
Disable Pre-fetch Transfer Length  0
Minimum Pre-fetch                  0
Maximum Pre-fetch                  0
Maximum Pre-fetch Ceiling          0

scsitools查看到的信息比较高大上,直接看不太懂。

2 Comments

  1. premier 2014-12-06

    非常棒!

  2. Anonymous 2017-09-29

    很棒!好用

Leave a Reply

Your email address will not be published. Required fields are marked *