hdparm -c /dev/sda

hdparm -c /dev/sda

我正在尝试调试我的 Macbook Air SSD,但出现了 IO_support 错误。

hdparm -c /dev/sda

/dev/sda:
 IO_support    =-2130557184 (???)

hdparm -c0 /dev/sda

/dev/sda:
 setting 32-bit IO_support flag to 0
 IO_support    =-2130557184 (???)

hdparm -c1 /dev/sda

/dev/sda:
 setting 32-bit IO_support flag to 1
 HDIO_SET_32BIT failed: Invalid argument
 IO_support    =-2130557184 (???)

因此我还是尝试安全擦除我的 SSD,这似乎有效。

sh-4.1# hdparm --user-master u --security-set-pass Eide /dev/sda

 security_password="Eide"

 /dev/sda:
 Issuing SECURITY_SET_PASS command, password="Eide", user=user, mode=high

sh-4.1# hdparm --user-master u --security-erase Eide /dev/sda

  security_password="Eide"

  /dev/sda:
  Issuing SECURITY_ERASE command, password="Eide", user=user

sh-4.1# hdparm --user-master u --security-set-pass Eide /dev/sda

  security_password="Eide"

  /dev/sda:
  Issuing SECURITY_SET_PASS command, password="Eide", user=user, mode=high

sh-4.1# hdparm --user-master u --security-erase-enhanced Eide /dev/sda

  security_password="Eide"

  /dev/sda:
  Issuing SECURITY_ERASE command, password="Eide", user=user

但是当我查询 32 位 IO 设置时...

hdparm -c /dev/sda

/dev/sda:
 IO_support    =-2130557184 (???)

两个 ATA 安全擦除命令完成后,驱动器标识显示:

hdparm -i /dev/sda

/dev/sda:

 Model=APPLE SSD TS128C, FwRev=CJAA0201, SerialNo=71BA50Q5K6IK
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=unknown, MaxMultSect=16, MultSect=16
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=236978176
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 
 AdvancedPM=yes: unknown setting WriteCache=enabled
 Drive conforms to: Unspecified:  ATA/ATAPI-3,4,5,6,7

 * signifies the current active mode

注意:我对这个输出也有一些疑问,但这些疑问并不像“不适当的 IO 控制”问题那么重要(我不这么认为?)。

  1. 那个几何配置有意义吗?我以为应该有 255 个磁头,所以应该是 xxx/255/63 之类的?
  2. SectSize=0 ? 难道不应该是 512 吗?
  3. 为什么BuffType和BuffSize是“未知”的?
  4. 为什么APM设置“未知”?
  5. 为什么驱动器符合“未指定的 ATA/ATAPI”标准?

尝试设置 using_DMA 标志失败:

hdparm -d /dev/sda

/dev/sda:
 HDIO_GET_DMA failed: Inappropriate ioctl for device

hdparm -d1 /dev/sda

/dev/sda:
 setting using_dma to 1 (on)
 HDIO_SET_DMA failed: Inappropriate ioctl for device
 HDIO_GET_DMA failed: Inappropriate ioctl for device

什么是“适当的 ioctl”?

重置驱动器不起作用。

hdparm -w /dev/sda

/dev/sda:
 resetting drive
 HDIO_DRIVE_RESET failed: Invalid argument

hdparm --dco-identify /dev/sda

/dev/sda:
DCO Revision: 0x0002
The following features can be selectively disabled via DCO:
    Transfer modes:
         mdma0 mdma1 mdma2
         udma0 udma1 udma2 udma3 udma4 udma5
    Real max sectors: 236978176
    ATA command/feature sets:
         SMART self_test error_log security HPA
         selective_test
    SATA command/feature sets:
         interface_power_management

hdparm --yes-i-know-what-i-am-doing --dco-restore /dev/sda

/dev/sda:
 issuing DCO restore command
 HDIO_DRIVE_CMD(dco_restore) failed: Input/output error

任何观察、问题、提示或答案都值得赞赏!

相关内容