• Welcome to LiuJason's Blog!

Linux下使用lshw批量查看磁盘信息|序列号|列表

Linux笔记 Jason 5 years ago (2020-03-18) 1419 Views 0 Comments QR code of this page

我们都知道smartmontools可以查看硬盘的相信smart信息,但是如果我们只是想要查看简单的磁盘列表(含序列号)的话,直接用lshw即可:

[root@virt-us-124 ~]# lshw -class disk
  *-disk:0                  
       description: ATA Disk
       product: WDC WD2002FYPS-0
       vendor: Western Digital
       physical id: 0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: 1G01
       serial: WD-WCAVY5445184
       size: 1863GiB (2TB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512 signature=000d0208
  *-disk:1
       description: ATA Disk
       product: GLOWAY STK1.5TS3
       physical id: 1
       bus info: scsi@2:0.0.0
       logical name: /dev/sdb
       version: 1.00
       serial: 201901150210
       size: 1397GiB (1500GB)
       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512
  *-disk:2
       description: ATA Disk
       product: WDC WD2002FYPS-0
       vendor: Western Digital
       physical id: 2
       bus info: scsi@4:0.0.0
       logical name: /dev/sdc
       version: 1G01
       serial: WD-WCAVY6902357
       size: 1863GiB (2TB)
       capabilities: gpt-1.00 partitioned partitioned:gpt
       configuration: ansiversion=5 guid=0132c97e-552c-4101-aa31-7e3700319bc0 logicalsectorsize=512 sectorsize=512
  *-disk:3
       description: ATA Disk
       product: WDC WD2002FYPS-0
       vendor: Western Digital
       physical id: 3
       bus info: scsi@5:0.0.0
       logical name: /dev/sdd
       version: 1G01
       serial: WD-WCAVY6609701
       size: 1863GiB (2TB)
       capabilities: gpt-1.00 partitioned partitioned:gpt
       configuration: ansiversion=5 guid=4e5eff1c-7a9b-4b3c-a4f4-dbc6d15b655f logicalsectorsize=512 sectorsize=512

This article is under CC BY-NC-SA 4.0 license.
Please quote the original link:https://www.liujason.com/article/661.html
Like (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址