4

Having looked at this question:

(How to know if a disk is an SSD or an HDD)

I am able to detect HDD and SSD. The problem now is that I don't know how to detect SSHD, since the hdparm tool shows that my disk (ST1000DX001) is a classic HDD.

Am I able to detect it basing on the any of the information gathered by issuing IDENTIFY Ata command?

  • Can you output the results of smartctl -a /dev/sda | grep "Rotation" change sda with thr appropriate device. – user994144 Aug 04 '16 at 12:07
  • For a particular model, the definitive way to tell is to look it up on the producer's site (the model you mention is indeed a SSHD). – Satō Katsura Aug 04 '16 at 12:51

1 Answers1

5

I don't think there's any absolutely certain way to detect an SSHD, but if the drive is known to smartctl, you can use smartctl -P show.

e.g.

$ sudo smartctl -P show /dev/sda
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-4.6-2.dmz.2-liquorix-amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

Drive found in smartmontools Database.  Drive identity strings:
MODEL:              ST4000DX001-1CE168
FIRMWARE:           CC44
match smartmontools Drive Database entry:
MODEL REGEXP:       ST[124]000DX001-.*
FIRMWARE REGEXP:    .*
MODEL FAMILY:       Seagate Desktop SSHD
ATTRIBUTE OPTIONS:  188 Command_Timeout
                    240 Head_Flying_Hours

grep that for ^MODEL FAMILY:.*SSHD

smartctl knows about (at least some of) the Seagate SSHDs, but not the Western Digital WD10J31X (a 1TB laptop SSHD with 8GB cache), and probably others.

$ grep -i sshd /var/lib/smartmontools/drivedb/drivedb.h 
  { "Seagate Laptop SSHD", // tested with ST500LM000-1EJ162/SM11
  { "Seagate Desktop SSHD", // tested with ST2000DX001-1CM164/CC43

if you have an SSHD that smartctl doesn't know about, please submit a bug-report or patch.


Another thing that occurs to me is that most (all?) HDDs only support SATA2 transfer speeds, because 3.0Gbps is far more than they're capable of anyway.

So if you've determined that a drive is an HDD, you can then do something like hdparm -I /dev/XXX | grep -E 'Gen3 signaling speed|6.0Gb/s)' to see if it's an SSHD.

e.g. on my system with a mix of WD, ST, and OCZ HDDs, SSHDs and SSDs:

$ list_disks
sda ST4000DX001-1CE168_Z303PTHA
sdb ST4000DX001-1CE168_Z303PSH6
sdc ST4000DX001-1CE168_Z302ZSGB
sdd ST4000DX001-1CE168_Z303PVZ9
sde WDC_WD10EACS-00ZJB0_WD-WCASJ2114122
sdf WDC_WD10EACS-00ZJB0_WD-WCASJ2195141
sdg WDC_WD10EARS-00Y5B1_WD-WMAV50933036
sdh ST31000528AS_9VP18CCV
sdi OCZ-VECTOR_OCZ-8RL5XW08536INH7R
sdj OCZ-VECTOR_OCZ-0974C023I4P2G1B8

$ for i in /dev/sd? ; do echo -n "$i: " ; sudo hdparm -I "$i" | 
    grep -E 'Gen3 signaling speed|6.0Gb/s)' || echo ; done
/dev/sda:      *    Gen3 signaling speed (6.0Gb/s)
/dev/sdb:      *    Gen3 signaling speed (6.0Gb/s)
/dev/sdc:      *    Gen3 signaling speed (6.0Gb/s)
/dev/sdd:      *    Gen3 signaling speed (6.0Gb/s)
/dev/sde: 
/dev/sdf: 
/dev/sdg: 
/dev/sdh: 
/dev/sdi:      *    Gen3 signaling speed (6.0Gb/s)
/dev/sdj:      *    Gen3 signaling speed (6.0Gb/s)

The SSHDs and the SSD report Gen3, the HDDs don't.

I'm not sure this is 100% reliable...my HDDs are a bit dated, newer HDDs might use Gen3 anyway, just so the manufacturers can standardise on a single interface chip/board.

cas
  • 78,579
  • Thank you for your answer. I was rather looking for a way to detect SSHD based purely on ATA IDENTIFY. Your answer shows an alternative approach, that I was going to omit (veryfying the model number with some community-prepared disk database). Anyway definitely +1. – Peter Cerba Aug 04 '16 at 12:49
  • Another keyword to look for is "hybrid" (it does find one more model). But this seems to miss WD SSHDs completely. – Satō Katsura Aug 04 '16 at 12:54
  • @SatoKatsura - good point. the only thing that grep -i hybrid /var/lib/smartmontools/drivedb/drivedb.h shows up on my system is { "Seagate Momentus 5400 PSD", // Hybrid drives. but viewing that file in less shows that there "Momentus" is also worth grepping for. – cas Aug 04 '16 at 13:04
  • Actually my newer HDDs support Gen3 signalling speed (6.0Gb/s), thanks anyway. – Peter Cerba Aug 04 '16 at 13:58
  • I suspected that might be the case. smartctl -P show seems like your best option so far then. If the drives don't report the required info to linux when it queries them, there's no way for linux or any tools to know. it would be interesting to know what speed SAS and NVMe drives report. SAS can do up to 12Gbps, and can be NVMe much faster. – cas Aug 04 '16 at 16:27