我正在尝试调试硬件问题,我的第一个目标是 SSD 硬盘。但是,该驱动器未启用 SMART,并且几乎所有检查 SSD 健康状况的建议都包括使用与 SMART 相关的工具。
我正在使用华硕 EEE;以下是一些信息:
$ smartctl -i /dev/sda
smartctl 5.43 2012-06-30 r3573 [i686-linux-3.5.4-1-ARCH] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Asus-Phison SSD
Device Model: ASUS-PHISON SSD
Serial Number:
Firmware Version: TST2.04U
User Capacity: 8,069,677,056 bytes [8.06 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 5
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Tue Oct 2 14:45:58 2012 CEST
SMART support is: Unavailable - device lacks SMART capability.
有任何想法吗?
答案1
我最近也遇到了这个问题。由于 Asus-Phison SSD 驱动器错误地报告不支持 SMART,因此 smartctl 通常会中止而不实际尝试启用 SMART——但您确实可以使用以下-T permissive
选项强制它尝试:
# smartctl -s on /dev/sda
smartctl 5.41 2011-06-09 r3365 [i686-linux-3.2.0-23-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
SMART support is: Unavailable - device lacks SMART capability.
A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options.
# smartctl -T permissive -s on /dev/sda
smartctl 5.41 2011-06-09 r3365 [i686-linux-3.2.0-23-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
SMART support is: Unavailable - device lacks SMART capability.
=== START OF ENABLE/DISABLE COMMANDS SECTION ===
SMART Enabled.
# smartctl -T permissive -a /dev/sda
smartctl 5.41 2011-06-09 r3365 [i686-linux-3.2.0-23-generic] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Device Model: ASUS-PHISON OB SSD
Serial Number: OS6Q85000208432
Firmware Version: TST2.04P
User Capacity: 4,034,838,528 bytes [4.03 GB]
Sector Size: 512 bytes logical/physical
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 5
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Mon May 20 19:26:06 2013 EDT
SMART support is: Unavailable - device lacks SMART capability.
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0xff) Offline data collection activity
[...]
(至少这对我的 Eee PC 900 中的 4GB 和 16GB ASUS-PHISON SSD 驱动器有效。)
我假设 2008 年 9 月 smartmontools-database 列表消息的发布者必须使用-T permissive
它来获取那里显示的输出;可惜他在帖子中没有提到这个事实......
答案2
您应该能够通过以下方式启用 SMART 报告
smartctl -s on /dev/sda
根据此消息来自 smartmontools-database 列表-- 您 SSD 上的固件看起来只是该设备上的固件的略微更新版本,并且从那里列出的输出来看,向设备发送 SMART ENABLE 命令将产生您想要的结果。这就是 smartctl 的“-s on”选项的作用,因此一旦您发出该命令,“smartctl -i /dev/sda”应该会给您正确的结果。(如果设置在重新启动后不保留,您可以将“smartctl -s on /dev/sda”命令放入 /etc/rc.local 或类似文件中,以在启动过程中应用它。)
答案3
smartctl -T permissive -d sat --smart=on --offlineauto=on --saveauto=on /dev/sdX
确保从列表中选择正确的设备类型。通常萨特或者nvme作品。
-d TYPE, --device=TYPE
Specify device type to one of:
ata, scsi[+TYPE], nvme[,NSID], sat[,auto][,N][+TYPE], usbasm1352r,N, usbcypress[,X], usbjmicron[,p][,x][,N], usbprolific, usbsunplus, sntasmedia, sntjmicron[,NSID], sntrealtek, jmb39x[-q],N[,sLBA][,force][+TYPE], jms56x,N[,sLBA][,force][+TYPE], areca,N/E, 3ware,N, hpt,L/M/N, megaraid,N, aacraid,H,L,ID, sssraid,E,S, cciss,N, auto, test