3

On Linux I know that sda, sdb, and sdh are hard drives, but I don't know what is sdc, sdd, sde, sdf and sdg are. Some of them are (I think) empty and some of them, the kernel tries to make them spinning without success

Is there a command to know what there is behind those?

$ lsblk -l | grep sd
sda         8:0    0   120G  0 disk 
sda2        8:2    0   110M  0 part /home/user/sda2
sda4        8:4    0   100M  0 part 
sda7        8:7    0    10G  0 part /home/user/sda7
sda8        8:8    0    10G  0 part /home/user/sda8
sdb         8:16   0    60T  0 disk 
sdb1        8:17   0    60T  0 part /home/user/sdb1
sdc         8:32   1     0B  0 disk 
sdd         8:48   1     0B  0 disk 
sde         8:64   1     0B  0 disk 
sdf         8:80   1     0B  0 disk 
sdg         8:96   1     0B  0 disk 
sdh         8:112  0    70G  0 disk 
sdh1        8:113  0    40G  0 part /home/user/sdh1
sdh2        8:114  0    30G  0 part /home/user/sdh2
$ grep . /sys/block/sd*/device/model
/sys/block/sdc/device/model:STORAGE DEVICE  
/sys/block/sdd/device/model:STORAGE DEVICE  
/sys/block/sde/device/model:STORAGE DEVICE  
/sys/block/sdf/device/model:STORAGE DEVICE  
/sys/block/sdg/device/model:STORAGE DEVICE
$ journalctl -b | egrep sd.\]
kernel: sd 6:0:0:3: [sdf] Attached SCSI removable disk
kernel: sd 6:0:0:1: [sdd] Attached SCSI removable disk
kernel: sd 6:0:0:2: [sde] Attached SCSI removable disk
kernel: sd 6:0:0:0: [sdc] Attached SCSI removable disk
kernel: sd 6:0:0:4: [sdg] Attached SCSI removable disk
kernel: sd 6:0:0:3: [sdf] Spinning up disk...
kernel: sd 6:0:0:0: [sdc] Spinning up disk...
kernel: sd 6:0:0:2: [sde] Spinning up disk...
kernel: sd 6:0:0:1: [sdd] Spinning up disk...
[indefinidely]
kernel: sd 6:0:0:2: [sde] Read Capacity(10) failed: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
kernel: sd 6:0:0:2: [sde] Sense Key : Not Ready [current] 
kernel: sd 6:0:0:2: [sde] Add. Sense: Logical unit is in process of becoming ready
[/indefinidely]
aaa
  • 157
  • 1
  • 9
  • Try with `lsblk -l | grep sd`. Eventually, add the result to the question, [edit] it and format the copied text with the code tool `{}`. – schrodingerscatcuriosity Jul 12 '21 at 16:31
  • `cat /sys/block/sda/device/model` will tell you the model string of the `sda` device if that is what you are asking. You can use `grep . /sys/block/sd*/device/model` to see all of them with one command. – icarus Jul 12 '21 at 16:38
  • What's the difference with `cat /sys/block/sd*/device/model`? – aaa Jul 12 '21 at 16:55
  • 2
    `cat` will just output the contents, `grep ^` or `grep .` will prefix each line with the filename so you know what goes with what. `grep .` will ignore empty lines. – icarus Jul 12 '21 at 18:14

2 Answers2

2

I use inxi for this, it gives a convenient report that is fairly complete depending on the verbosity levels selected (-x, -xx, -xxx, or -a). Also, there are other drive types than sd, there's hd, fio, nvme, mmcblk, a few others. Where this data comes from varies depending on if it's GNU/Linux or BSD, some is generated internally (like vendors), some comes from the system.

Basic report (-d adds optical drives to the -D drive report, -z filters sensitive info out, -y makes report 80 columns wide):

inxi -dzy
Drives:
  Local Storage: total: raw: 16.41 TiB usable: 9.13 TiB used: 1.23 TiB (13.5%) 
  ID-1: /dev/nvme0n1 vendor: Patriot model: Viper M.2 VPN100 size: 476.94 GiB 
  ID-2: /dev/nvme1n1 vendor: Patriot model: Viper M.2 VPN100 size: 953.87 GiB 
  ID-3: /dev/nvme2n1 vendor: Samsung model: SSD 960 EVO 250GB size: 232.89 GiB 
  ID-4: /dev/nvme3n1 vendor: Samsung model: SSD 960 EVO 250GB size: 232.89 GiB 
  ID-5: /dev/sda vendor: Seagate model: ST2000VN004-2E4164 size: 1.82 TiB 
  ID-6: /dev/sdb vendor: Seagate model: ST2000VN004-2E4164 size: 1.82 TiB 
  ID-7: /dev/sdc vendor: Seagate model: ST2000VN004-2E4164 size: 1.82 TiB 
  ID-8: /dev/sdd vendor: Seagate model: ST2000VN004-2E4164 size: 1.82 TiB 
  ID-9: /dev/sde vendor: Seagate model: ST2000VN004-2E4164 size: 1.82 TiB 
  ID-10: /dev/sdf vendor: Seagate model: ST2000VN004-2E4164 size: 1.82 TiB 
  ID-11: /dev/sdg vendor: Seagate model: ST2000VN004-2E4164 size: 1.82 TiB 
  ID-12: /dev/sdh vendor: Seagate model: ST2000VN004-2E4164 size: 1.82 TiB 
  Message: No optical or floppy data found.

More complete report, different system (with -xxx):

inxi -dxxxyz
Drives:
  Local Storage: total: 2.89 TiB used: 1.8 TiB (62.3%) 
  ID-1: /dev/sda vendor: Western Digital model: WD1003FZEX-00MK2A0 
  size: 931.51 GiB speed: 6.0 Gb/s rotation: 7200 rpm serial: <filter> 
  rev: 1A01 temp: 36.0 C scheme: GPT 
  ID-2: /dev/sdb vendor: Intel model: SSDSC2BW180A4 size: 167.68 GiB 
  speed: 6.0 Gb/s rotation: SSD serial: <filter> rev: DC32 temp: 33.0 C 
  scheme: MBR 
  ID-3: /dev/sdc vendor: Western Digital model: WD1001FALS-00E8B0 
  size: 931.51 GiB speed: 3.0 Gb/s rotation: 7200 rpm serial: <filter> 
  rev: 0K05 temp: 44.0 C scheme: GPT 
  ID-4: /dev/sdd vendor: Crucial model: CT1000MX500SSD4 size: 931.51 GiB 
  speed: 6.0 Gb/s rotation: SSD serial: <filter> rev: 023 temp: 48.0 C 
  scheme: GPT 
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: DVDRAM GH20LS10 rev: FL00 
  dev-links: cdrom,cdrw,dvd,dvdrw 
  Features: speed: 48 multisession: yes audio: yes dvd: yes 
  rw: cd-r,cd-rw,dvd-r,dvd-ram state: running

Complete report (using -a and sudo, which shows smartctl results per drive as well):

sudo inxi -dayz
Drives:
  Local Storage: total: 2.89 TiB used: 1.8 TiB (62.3%) 
  ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital 
  model: WD1003FZEX-00MK2A0 family: Black size: 931.51 GiB block-size: 
  physical: 4096 B logical: 512 B sata: 3.1 speed: 6.0 Gb/s rotation: 7200 rpm 
  serial: <filter> rev: 1A01 temp: 36.0 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 289d 18h cycles: 1230 
  ID-2: /dev/sdb maj-min: 8:16 vendor: Intel model: SSDSC2BW180A4 
  family: 53x and Pro 1500/2500 Series SSDs size: 167.68 GiB block-size: 
  physical: 512 B logical: 512 B sata: 3.0 speed: 6.0 Gb/s rotation: SSD 
  serial: <filter> rev: DC32 temp: 33.0 C scheme: MBR 
  SMART: yes state: enabled health: PASSED on: 1y 75d 22h cycles: 2034 
  read: 657.66 GiB written: 1.29 TiB 
  ID-3: /dev/sdc maj-min: 8:32 vendor: Western Digital 
  model: WD1001FALS-00E8B0 family: Caviar Black size: 931.51 GiB block-size: 
  physical: 512 B logical: 512 B sata: 2.5 speed: 3.0 Gb/s rotation: 7200 rpm 
  serial: <filter> rev: 0K05 temp: 44.0 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 1y 77d 10h cycles: 1781 
  ID-4: /dev/sdd maj-min: 8:48 vendor: Crucial model: CT1000MX500SSD4 
  family: Micron Client SSDs size: 931.51 GiB block-size: physical: 4096 B 
  logical: 512 B sata: 3.3 speed: 6.0 Gb/s rotation: SSD serial: <filter> 
  rev: 023 temp: 48.0 C scheme: GPT 
  SMART: yes state: enabled health: PASSED on: 163d 8h cycles: 649 
  written: 1.27 TiB 
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: DVDRAM GH20LS10 rev: FL00 
  dev-links: cdrom,cdrw,dvd,dvdrw 
  Features: speed: 48 multisession: yes audio: yes dvd: yes 
  rw: cd-r,cd-rw,dvd-r,dvd-ram state: running

Complete report in fieldname: value format (using -y1):

sudo inxi -dazy1
Drives:
  Local Storage: 
    total: 2.89 TiB
    used: 1.8 TiB (62.3%)
  ID-1: /dev/sda
    maj-min: 8:0
    vendor: Western Digital
    model: WD1003FZEX-00MK2A0
    family: Black
    size: 931.51 GiB
    block-size: 
      physical: 4096 B
      logical: 512 B
    sata: 3.1
    speed: 6.0 Gb/s
    rotation: 7200 rpm
    serial: <filter>
    rev: 1A01
    temp: 36.0 C
    scheme: GPT
    SMART: yes
      state: enabled
      health: PASSED
      on: 289d 18h
      cycles: 1230
  ID-2: /dev/sdb
    maj-min: 8:16
    vendor: Intel
    model: SSDSC2BW180A4
    family: 53x and Pro 1500/2500 Series SSDs
    size: 167.68 GiB
    block-size: 
      physical: 512 B
      logical: 512 B
    sata: 3.0
    speed: 6.0 Gb/s
    rotation: SSD
    serial: <filter>
    rev: DC32
    temp: 33.0 C
    scheme: MBR
    SMART: yes
      state: enabled
      health: PASSED
      on: 1y 75d 22h
      cycles: 2034
      read: 657.66 GiB
      written: 1.29 TiB
  ID-3: /dev/sdc
    maj-min: 8:32
    vendor: Western Digital
    model: WD1001FALS-00E8B0
    family: Caviar Black
    size: 931.51 GiB
    block-size: 
      physical: 512 B
      logical: 512 B
    sata: 2.5
    speed: 3.0 Gb/s
    rotation: 7200 rpm
    serial: <filter>
    rev: 0K05
    temp: 44.0 C
    scheme: GPT
    SMART: yes
      state: enabled
      health: PASSED
      on: 1y 77d 10h
      cycles: 1781
  ID-4: /dev/sdd
    maj-min: 8:48
    vendor: Crucial
    model: CT1000MX500SSD4
    family: Micron Client SSDs
    size: 931.51 GiB
    block-size: 
      physical: 4096 B
      logical: 512 B
    sata: 3.3
    speed: 6.0 Gb/s
    rotation: SSD
    serial: <filter>
    rev: 023
    temp: 48.0 C
    scheme: GPT
    SMART: yes
      state: enabled
      health: PASSED
      on: 163d 8h
      cycles: 649
      written: 1.27 TiB
  Optical-1: /dev/sr0
    vendor: HL-DT-ST
    model: DVDRAM GH20LS10
    rev: FL00
    dev-links: cdrom,cdrw,dvd,dvdrw
    Features: 
      speed: 48
      multisession: yes
      audio: yes
      dvd: yes
      rw: cd-r,cd-rw,dvd-r,dvd-ram
      state: running
Lizardx
  • 2,990
  • 16
  • 18
1

The disks are unmounted, if you want view information then to use:

lsblk -o MODEL,TRAN,VENDOR,NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE,MAJ:MIN,TYPE,STATE,SUBSYSTEMS

or

sudo lshw -class disk