如何区分哪个磁盘是sda磁盘,哪个磁盘是sdb磁盘?

如何区分哪个磁盘是sda磁盘,哪个磁盘是sdb磁盘?

从 df -k 命令中,我看到 sda、sdb、sdc 磁盘。它们有一些分区(例如,sda 有 sda1、sda3)。我想暂时分离 sdb 和 sdc 以进行操作系统升级。我如何准确辨别哪个磁盘是哪个? (实际上我知道sdc是我最近连接的磁盘,但是我如何从SCSI连接中分辨出sda,sdb,sdc?我记得SCSI连接器没有任何顺序..)

ckim@stph45:/boot/grub] cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: Samsung SSD 850  Rev: EXM0
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: ST2000DM001-1CH1 Rev: CC27
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
  Vendor: HL-DT-ST Model: BD-RE  BH16NS40  Rev: 1.00
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: WDC WD100EFAX-68 Rev: 83.H
  Type:   Direct-Access                    ANSI  SCSI revision: 05
ckim@stph45:/boot/grub] df -k
Filesystem      1K-blocks      Used  Available Use% Mounted on
/dev/sda3       226026064 103433752  111103800  49% /
tmpfs            32958068         0   32958068   0% /dev/shm
/dev/sda1       201454560   4911408  186303152   3% /tools
/dev/sdc1      4806455048 387782752 4174511784   9% /home1
/dev/sdc2      4806466304  18391096 4543914032   1% /home2
/dev/sdb1      1922727280 853724060  971327620  47% /home

答案1

您可以使用以下命令获取每个物理块设备的品牌和型号lsblk

$ lsblk -do +VENDOR,MODEL,SERIAL
NAME MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT VENDOR   MODEL            SERIAL
sda    8:0    0   1.8T  0 disk            ATA      WDC WD20EARS-00M WD-WCAZA571XXXX
sdf    8:80   0 465.1G  0 disk            WD       My Passport 070A WD-WXF1A30YXXXX
sr0   11:0    1  1024M  0 rom             HL-DT-ST DVDRAM GH22LS40  6FA3D3AFXXXX
sr1   11:1    1   668M  0 rom             WD       Virtual CD 070A  57584631413330593830XXXX

相关内容