CentOS7にlshwでディスクの型番を取得する

投稿者: | 2017年8月6日

# yum install lshw
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* remi-safe: mirror.bebout.net
Resolving Dependencies
–> Running transaction check
—> Package lshw.x86_64 0:B.02.17-12.el7 will be installed
–> Processing Dependency: hwdata for package: lshw-B.02.17-12.el7.x86_64
–> Running transaction check
—> Package hwdata.x86_64 0:0.252-8.4.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
lshw x86_64 B.02.17-12.el7 base 286 k
Installing for dependencies:
hwdata x86_64 0.252-8.4.el7 base 2.1 M

Transaction Summary
================================================================================
Install 1 Package (+1 Dependent package)

Total download size: 2.4 M
Installed size: 13 M
Is this ok [y/d/N]: y
Downloading packages:
(1/2): lshw-B.02.17-12.el7.x86_64.rpm | 286 kB 00:00
(2/2): hwdata-0.252-8.4.el7.x86_64.rpm | 2.1 MB 00:00
——————————————————————————–
Total 5.3 MB/s | 2.4 MB 00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : hwdata-0.252-8.4.el7.x86_64 1/2
Installing : lshw-B.02.17-12.el7.x86_64 2/2
Verifying : lshw-B.02.17-12.el7.x86_64 1/2
Verifying : hwdata-0.252-8.4.el7.x86_64 2/2

Installed:
lshw.x86_64 0:B.02.17-12.el7

Dependency Installed:
hwdata.x86_64 0:0.252-8.4.el7

Complete!

# sudo lshw -c disk
*-cdrom
description: SCSI CD-ROM
physical id: 0.0.0
bus info: scsi@1:0.0.0
logical name: /dev/cdrom
logical name: /dev/sr0
capabilities: audio
configuration: status=nodisc
*-virtio3
description: Virtual I/O device
physical id: 0
bus info: virtio@3
logical name: /dev/vda
size: 200GiB (214GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: driver=virtio_blk guid=24e50a8f-eb81-4573-9f30-1084d97ebbc2 logicalsectorsize=512 sectorsize=512