SMART 支持可用,但重启后会恢复为禁用状态

SMART 支持可用,但重启后会恢复为禁用状态

我已经在我的 ubuntu 服务器上安装了 smartmontools。

HDD 具备以下智能功能:

sudo smartctl -i /dev/sda 



=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Scorpio Blue Serial ATA (Adv. Format)
Device Model:     WDC WD10TPVT-11U4RT1
Serial Number:    WD-WXC1A80P0314
LU WWN Device Id: 5 0014ee 20507d2dc
Firmware Version: 01.01A01
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Tue Sep 10 16:05:58 2013 GET
SMART support is: Available - device has SMART capability.
SMART support is: Disabled

我通过运行来启用它:

sudo smartctl -s on /dev/sda 

如果我再次运行命令 smartctl -i,我会看到 SMART 支持:已启用。但重新启动后,它会恢复为禁用状态。

答案1

使用您最喜欢的文本编辑器编辑您的/etc/rc.local文件,即:nano /etc/rc.local并在脚本的最后一行之前添加启用智能支持的命令:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

smartctl -s on /dev/sda 

exit 0

使用 Ctrl+O 然后使用 Ctrl+X 保存更改。

该脚本在每次启动时运行,因此每次启动时都会对该磁盘启用智能支持。

相关内容