首页 > 其他分享 >解决西部数据 C1 门,磁头频繁归位

解决西部数据 C1 门,磁头频繁归位

时间:2023-07-11 20:35:33浏览次数:46  
标签:200 Old 西部数据 idle3ctl age 000 归位 C1 Offline

目前在用的 All in One NAS 上面挂了一块远古时期的 2.5 寸西数 500G 蓝盘存数据,我自己都不记得这款硬盘是哪里来的,也许是之前的笔记本电脑里拆下来的 N 手盘。不过好在它还蛮争气,连续服役这么多年依旧没有坏道。

硬盘在平时经常出现 "啧啧" 的磁头归位声,隔几分钟就有一次,一开始以为是黑群晖的配置没有做好,反复尝试多次后发现不是群晖问题: 硬盘基本不会自行休眠,即使休眠了,也马上会被自己唤醒。其实之前在笔记本上用的时候也有这样的声音,只是当时没特别关注。

所谓的 "C1 门",就是指 SMART 值中的 C1 数据异常,百度说超过 2W 就是中招了,我一看好家伙,已经 5W 多了

(smartctl 读出来的并不是 C1,但是 Windows 下的软件读出来是 C1)

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x0b00   200   200   051    Old_age   Offline      -       105
  3 Spin_Up_Time            0x0c00   150   143   021    Old_age   Offline      -       1466
  4 Start_Stop_Count        0xb700   093   093   000    Old_age   Offline      -       7450
  5 Reallocated_Sector_Ct   0xb800   200   200   140    Old_age   Offline      -       0
  7 Seek_Error_Rate         0xbb00   200   200   051    Old_age   Offline      -       0
  9 Power_On_Hours          0xbc00   085   085   000    Old_age   Offline      -       11431
 10 Spin_Retry_Count        0xbe00   100   100   051    Old_age   Offline      -       0
 11 Calibration_Retry_Count 0xbf00   100   100   000    Old_age   Offline      -       0
 12 Power_Cycle_Count       0xc000   097   097   000    Old_age   Offline      -       3421
183 Runtime_Bad_Block       0xc100   100   100   000    Old_age   Offline      -       0
184 End-to-End_Error        0xc200   100   100   000    Old_age   Offline      -       0
187 Reported_Uncorrect      0xc300   100   100   000    Old_age   Offline      -       0
188 Command_Timeout         0xc400   100   081   000    Old_age   Offline      -       90195755035
190 Airflow_Temperature_Cel 0xc500   066   046   000    Old_age   Offline      -       34
191 G-Sense_Error_Rate      0xc600   001   001   000    Old_age   Offline      -       390
192 Power-Off_Retract_Count 0xc700   200   200   000    Old_age   Offline      -       417
193 Load_Cycle_Count        0xc800   182   182   000    Old_age   Offline      -       56199
194 Temperature_Celsius     0xf000   109   089   000    Old_age   Offline      -       34
195 Hardware_ECC_Recovered  0xf100   200   200   000    Old_age   Offline      -       0
196 Reallocated_Event_Count 0xf200   200   200   000    Old_age   Offline      -       0
197 Current_Pending_Sector  0xfe00   200   200   000    Old_age   Offline      -       0
198 Offline_Uncorrectable   0x0000   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x1800   200   200   000    Old_age   Offline      -       0
200 Multi_Zone_Error_Rate   0x0000   100   253   051    Old_age   Offline      -       0
240 Head_Flying_Hours       0x0000   088   088   000    Old_age   Offline      -       9354
241 Total_LBAs_Written      0x0000   200   200   000    Old_age   Offline      -       17932771727
242 Total_LBAs_Read         0x2000   200   200   000    Old_age   Offline      -       18618376569
254 Free_Fall_Sensor        0x0000   200   200   000    Old_age   Offline      -       0

导致问题的原因就是西数的固件有问题,磁头复位间隔设置得太短,导致它频繁回收,可以用 wdidle3 工具修改一下休眠时间。不过 Linux 下并没有 wdidle3 工具,所以要用一个第三方工具修改: idle3-tools

下载源码并编译,得到可执行文件

root@ayabe:~/work/idle3-tools-0.9.1# make
cc -g -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs    -c -o idle3ctl.o idle3ctl.c
idle3ctl.c:47:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
   47 | int check_WDC_drive()
      |     ^~~~~~~~~~~~~~~
idle3ctl.c:88:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
   88 | int VSC_enable()
      |     ^~~~~~~~~~
idle3ctl.c:112:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  112 | int VSC_disable()
      |     ^~~~~~~~~~~
idle3ctl.c:136:5: warning: no previous prototype for ‘VSC_send_key’ [-Wmissing-prototypes]
  136 | int VSC_send_key(char rw)
      |     ^~~~~~~~~~~~
idle3ctl.c:166:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  166 | int VSC_send_write_key()
      |     ^~~~~~~~~~~~~~~~~~
idle3ctl.c:173:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
  173 | int VSC_send_read_key()
      |     ^~~~~~~~~~~~~~~~~
idle3ctl.c:182:5: warning: no previous prototype for ‘VSC_get_timer’ [-Wmissing-prototypes]
  182 | int VSC_get_timer(unsigned char *timer)
      |     ^~~~~~~~~~~~~
idle3ctl.c:213:5: warning: no previous prototype for ‘VSC_set_timer’ [-Wmissing-prototypes]
  213 | int VSC_set_timer(unsigned char timer)
      |     ^~~~~~~~~~~~~
idle3ctl.c:244:6: warning: no previous prototype for ‘cleanup’ [-Wmissing-prototypes]
  244 | void cleanup(void)
      |      ^~~~~~~
idle3ctl.c:252:6: warning: no previous prototype for ‘show_version’ [-Wmissing-prototypes]
  252 | void show_version(void)
      |      ^~~~~~~~~~~~
idle3ctl.c:258:6: warning: no previous prototype for ‘show_usage’ [-Wmissing-prototypes]
  258 | void show_usage(void)
      |      ^~~~~~~~~~
cc -g -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs    -c -o sgio.o sgio.c
cc -s -o idle3ctl idle3ctl.o sgio.o
#strip idle3ctl

root@ayabe:~/work/idle3-tools-0.9.1# ls -al
total 220
drwxr-xr-x 2 1000 1000  4096 Jul 11 19:58 .
drwxr-xr-x 3 root root  4096 Jul 11 19:57 ..
-rw-r--r-- 1 1000 1000 35148 May 31  2011 COPYING
-rwxr-xr-x 1 root root 26856 Jul 11 19:58 idle3ctl
-rw-r--r-- 1 1000 1000  1726 May 31  2011 idle3ctl.8
-rw-r--r-- 1 1000 1000  9158 May 31  2011 idle3ctl.c
-rw-r--r-- 1 root root 44360 Jul 11 19:58 idle3ctl.o
-rw-r--r-- 1 1000 1000  1821 May 31  2011 Makefile
-rw-r--r-- 1 1000 1000 13625 May 31  2011 sgio.c
-rw-r--r-- 1 1000 1000  5674 May 31  2011 sgio.h
-rw-r--r-- 1 root root 60824 Jul 11 19:58 sgio.o

把休眠等待时间设置为 300 秒

root@ayabe:~/work/idle3-tools-0.9.1# ./idle3ctl -s 300 /dev/sdb
Idle3 timer set to 44 (0x2c)
Please power cycle your drive off and on for the new setting to be taken into account. A reboot will not be enough!

提示我们需要完全关闭电源再启动而不是重启,关闭主机后拔掉电源线,等待半分钟左右再上电就行了

标签:200,Old,西部数据,idle3ctl,age,000,归位,C1,Offline
From: https://www.cnblogs.com/azwhikaru/p/17545820.html

相关文章

  • [TM4]TM4C123G使用笔记(一)
    [TM4]TM4C123G使用笔记(一)TI的板子真让人头大......
  • Atcoder ARC164B Switching Travel
    称\(c_u\not=c_v\)的边\((u,v)\)为普通边,\(c_u=c_v\)的边\((u,v)\)为特殊边。能发现若满足条件则这个环应该是由一条特殊边和若干条普通便组成的(从特殊边的一个顶点出发一直经过普通边,最后走到特殊边的另一个顶点再走回来)。于是若这个特殊边的两个顶点能只通过普通......
  • ARC164
    ARC164A考虑先给\(N\)按三进制分解一下然后对于\(3^m\rightarrow3^{m-1}\),实际上可以加\(2\)的贡献,我们先计算\(N\)最小需要\(S\)然后可以发现只要\(K-S\)是偶数即可#include<bits/stdc++.h>usingnamespacestd;signedmain(){//freopen("date.in","r",stdin);......
  • Atcoder ARC159C Permutation Addition
    设\(s=\sum\limits_{i=1}^na_i\),考虑加上排列\(p\),那么\(s\leftarrows+\frac{n\times(n+1)}{2}\)。当有解时,因为\(a_i\)相等,所以有\(s\bmodn=0\)。考虑\(n\bmod2=1\)时,\(\frac{n\times(n+1)}{2}\bmodn=0\),所以\(s\bmodn=0\)时才会有解。......
  • LTC1044ACS8#TRPBF Analog Devices 芯脉芯城
    LTC1044ACS8#TRPBF是一款电子元件或集成电路的型号。根据您提供的型号信息,以下是关于LTC1044ACS8#TRPBF的一般参数和特性的信息,这些信息是根据该型号的典型规格得出的。请注意,实际的参数可能会因产品版本和厂商而有所不同。LTC1044ACS8#TRPBF是一种电荷泵(ChargePump)集成电路,......
  • LTC1044AIN8#PBF Analog Devices 芯脉芯城
    LTC1044AIN8#PBF是一款电子元件或集成电路的型号。以下是关于LTC1044AIN8#PBF的一般参数和特性的信息,这些信息是根据该型号的典型规格得出的。请注意,实际的参数可能会因产品版本和厂商而有所不同。LTC1044AIN8#PBF是一种电荷泵(ChargePump)集成电路,通常用于电压转换、电压倍增......
  • LTC1042CN8#PBF ADI芯片 电子元器件 芯脉芯城
    LTC1042CN8#PBF是一款精密可编程单电源比较器的集成电路。以下是关于LTC1042CN8#PBF的详细参数:供电电压范围:LTC1042CN8#PBF的工作电源电压范围为2.7V至16V。它适用于多种电源电压条件,提供了灵活的供电选项。低功耗:该器件采用CMOS技术,具有低功耗特性。它的工作电流非常低,典型值为2......
  • 题解 ARC163C【Harmonic Mean】
    没想出来什么优美的解法,来个乱搞。特判平凡情况\(n\le2\),其中\(n=1\)显然有\(1=\frac{1}{1}\),\(n=2\)无解。众所周知\(1=\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\cdots+\frac{1}{2^k}+\frac{1}{2^k}\)。注意到公式中除了\(\frac{1}{2^k}\)有重复外,其余项均无重复。容易......
  • ABC143F 题解
    前言题目传送门!更好的阅读体验?很有趣的题。提供一种和现有题解略微不同的做法。思路突破点在于反着想。当最多能取\(x\)次时,每次我取的不同数字的数量,最多是多少。统计一下每个数字出现的次数\(cnt_i\)。那么这个最多次数应为\[\left\lfloor\dfrac{\sum\min(cnt_i,x)}x......
  • 「ARC133E」Cyclic Medians 题解
    本文网址:https://www.cnblogs.com/zsc985246/p/17513317.html,转载请注明出处。传送门「ARC133E」CyclicMedians题目大意给定\(n,m,V,A\),你需要计算所有长为\(n\)、值域为\([1,V]\)的整数序列\(x\)和长为\(m\)、值域为\([1,V]\)的整数序列\(y\)形成的序列对\((x_......