Is there any way of detecting if a drive is a SSD?

前端 未结 9 2071
面向向阳花
面向向阳花 2020-11-30 03:02

I\'m getting ready to release a tool that is only effective with regular hard drives, not SSD (solid state drive). In fact, it shouldn\'t be used with SSD\'s because it will

9条回答
  •  情书的邮戳
    2020-11-30 03:36

    My two cents to answering this old but very important question... If a disk is accessed via SCSI, then you will (potentially) be able to use SCSI INQUIRY command to request its rotational rate. VPD (Vital Product Data) page for that is called Block Device Characteristics and has a number 0xB1. Bytes 4 and 5 of this page contain a number with meaning:

    • 0000h "Medium rotation rate is not reported"
    • 0001h "Non-rotating medium (e.g., solid state)"
    • 0002h - 0400h "Reserved"
    • 0401h - FFFEh "Nominal medium rotation rate in rotations per minute (i.e., rpm) (e.g., 7 200 rpm = 1C20h, 10 000 rpm = 2710h, and 15 000 rpm = 3A98h)"
    • FFFFh "Reserved"

    So, SSD must have 0001h in this field. The T10.org document about this page can be found here.

    However, the implementation status of this standard is not clear to me.

提交回复
热议问题