POWERED BY RBSOFT

Узнать серийный номер диска

> Linux
Дата обновления: 23 мая 2024 г. Дата публикации: 23 мая 2024 г. Автор: Стрекаловский Александр

Утилита lsblk

lsblk —raw -o name,type,serial | grep disk

[root@s07 sites.available]# lsblk --raw -o name,type,serial | grep disk
sda disk 95O0V9DAS
sdb disk 95OZV0KAS
sdc disk PK2234P9HVUVHY
sdd disk W300LVWY

Утилита lshw

Установка утилиты: yum install -y lshw

lshw -class disk

[root@s07 sites.available]# lshw -class disk
  *-disk:0
       description: ATA Disk
       product: TOSHIBA DT01ACA2
       vendor: Toshiba
       physical id: 0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: ABB0
       serial: 95O0V9DAS
       size: 1863GiB (2TB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=4096 signature=0001996b
  *-disk:1
       description: ATA Disk
       product: TOSHIBA DT01ACA2
       vendor: Toshiba
       physical id: 1
       bus info: scsi@1:0.0.0
       logical name: /dev/sdb
       version: ABB0
       serial: 95OZV0KAS
       size: 1863GiB (2TB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=4096 signature=00085f56
  *-disk:2
       description: ATA Disk
       product: HGST HDN724030AL
       physical id: 2
       bus info: scsi@2:0.0.0
       logical name: /dev/sdc
       version: A5E0
       serial: PK2234P9HVUVHY
       size: 2794GiB (3TB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=4096 signature=ecdfece0
  *-disk:3
       description: ATA Disk
       product: ST3000VN000-1H41
       physical id: 3
       bus info: scsi@3:0.0.0
       logical name: /dev/sdd
       version: SC43
       serial: W300LVWY
       size: 2794GiB (3TB)
       configuration: ansiversion=5 logicalsectorsize=512 sectorsize=4096

вывести информацию только об установленных дисках

lshw -short -C disk

[root@s07 sites.available]# lshw -short -C disk
H/W path           Device      Class          Description
=========================================================
/0/100/1f.2/0      /dev/sda    disk           2TB TOSHIBA DT01ACA2
/0/100/1f.2/1      /dev/sdb    disk           2TB TOSHIBA DT01ACA2
/0/100/1f.2/2      /dev/sdc    disk           3TB HGST HDN724030AL
/0/100/1f.2/3      /dev/sdd    disk           3TB ST3000VN000-1H41