私のUSBハードドライブに実際に欠陥があることをどのように証明できますか?

私のUSBハードドライブに実際に欠陥があることをどのように証明できますか?

数年前に私は1つを買った。500GB Essentiel B外付けUSBハードドライブBoulanger(フランスマルチメディア店)製品です。それ以来、約1x/2年にわたってファイルシステムが欠落しているように見える2回の中断が発生しました(現在、NTFS)再フォーマットする必要があります。その後、次回失敗するまですべてが正常です。

一般的な症状:ハードドライブと他のメディア間のコピーの問題=>長い間ディスクに触れていないため、エラーメッセージに気づいていませんでしたが、「入力/出力エラー」のようなものです。

再フォーマットする前に以前のFSで私に提供したものは次のとおりです。

user@host:~$ ls -al /media/user/USER-EHD
ls: impossible d'accéder à '/media/user/USER-EHD/anniv_fany.avi': Erreur d'entrée/sortie
total 15841832
drwxrwxrwx  1 user  user        4096 oct.   3 21:14 .
drwx---rwx+ 6 root root       4096 mars  12 19:11 ..
-?????????? ? ?    ?             ?              ? anniv_fany.avi
drwxrwxrwx  1 user  user        4096 août  23  2020 xen_build
-rwxrwxrwx  1 user  user  1569481183 août   7  2016 踔ororite.avi
drwxrwxrwx  1 user  user        4096 août  23  2020 $RECYCLE.BIN
drwxrwxrwx  1 user  user        4096 août  21  2020 System Volume Information

奇妙な2つの点:

  • anniv_fany.avi:メタデータはありませんか? ? ? +入出力エラー
  • 蔔ororite.avi:実際の名前はsorororite.avi

そして

user@host:~$ lsblk -f /dev/sdg
NAME   FSTYPE LABEL    UUID                                 MOUNTPOINT
sdg                                                        
└─sdg1 ntfs   USER-EHD 67AC02BC429C25D2             /media/user/USER-EHD

SMARTチェック=>大丈夫に見えます(下記参照)。

注:SMARTは100%信頼できないことを知っています(HDDの実際の状態を知ることは役に立ちません)。

user@host:~$ sudo smartctl -a -d sat -t long /dev/sdg
# so ... 2 hour later
user@host:~$ sudo smartctl -l selftest -d sat /dev/sdg
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-148-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%       586         -
# 2  Extended offline    Completed without error       00%       500         -
# 3  Extended offline    Aborted by host               90%       499         -
# 4  Short offline       Completed without error       00%       499         -
# 5  Extended offline    Completed: read failure       00%       489         769438584
# 6  Extended offline    Completed: read failure       00%       488         769438584
# 7  Extended offline    Aborted by host               90%       486         -
# 8  Short offline       Completed without error       00%       486         -
# 9  Short offline       Completed without error       00%       112         -
2 of 2 failed self-tests are outdated by newer successful extended offline self-test # 1

=>それはすべてです:2つの古い読み取りエラーは古く、smartctlは長いテストがうまくいっていると思います!

詳細は次のとおりです。

user@host:~$ sudo smartctl -a -d sat /dev/sdg
[sudo] Mot de passe de user : 
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-148-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 2.5" HDD MQ01ABF...
Device Model:     TOSHIBA MQ01ABF050
Serial Number:    67ODTDZST
LU WWN Device Id: 5 000039 7d160c9a5
Firmware Version: AM001U
User Capacity:    500 107 862 016 bytes [500 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Sat Mar 13 16:30:13 2021 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x82) Offline data collection activity
                    was completed without error.
                    Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                    without error or no self-test has ever 
                    been run.
Total time to complete Offline 
data collection:        (  120) seconds.
Offline data collection
capabilities:            (0x5b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                    power-saving mode.
                    Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                    General Purpose Logging supported.
Short self-test routine 
recommended polling time:    (   2) minutes.
Extended self-test routine
recommended polling time:    ( 115) minutes.
SCT capabilities:          (0x003d) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

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     0x000b   100   100   050    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   100   100   050    Pre-fail  Offline      -       0
  3 Spin_Up_Time            0x0027   100   100   001    Pre-fail  Always       -       2054
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       491
  5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000b   100   100   050    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0005   100   100   050    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   099   099   000    Old_age   Always       -       588
 10 Spin_Retry_Count        0x0033   109   100   030    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       355
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       1
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       123
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       6041
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       30 (Min/Max 14/49)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
220 Disk_Shift              0x0002   100   100   000    Old_age   Always       -       0
222 Loaded_Hours            0x0032   100   100   000    Old_age   Always       -       132
223 Load_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
224 Load_Friction           0x0022   100   100   000    Old_age   Always       -       0
226 Load-in_Time            0x0026   100   100   000    Old_age   Always       -       262
240 Head_Flying_Hours       0x0001   100   100   001    Pre-fail  Offline      -       0

SMART Error Log Version: 1
ATA Error Count: 12 (device log contains only the most recent five errors)
    CR = Command Register [HEX]
    FR = Features Register [HEX]
    SC = Sector Count Register [HEX]
    SN = Sector Number Register [HEX]
    CL = Cylinder Low Register [HEX]
    CH = Cylinder High Register [HEX]
    DH = Device/Head Register [HEX]
    DC = Device Command Register [HEX]
    ER = Error register [HEX]
    ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 12 occurred at disk power-on lifetime: 492 hours (20 days + 12 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 78 b3 dc 4d  Error: UNC 8 sectors at LBA = 0x0ddcb378 = 232567672

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 03 08 78 b3 dc 40 00      01:08:22.969  READ DMA EXT
  ef 03 45 78 b3 dc 00 00      01:08:22.969  SET FEATURES [Set transfer mode]
  ef 03 0c 78 b3 dc 00 00      01:08:22.969  SET FEATURES [Set transfer mode]
  ec 03 08 78 b3 dc 00 00      01:08:22.968  IDENTIFY DEVICE
  ff ff ff ff ff ff ff 0c      01:08:22.967  [VENDOR SPECIFIC]

Error 11 occurred at disk power-on lifetime: 492 hours (20 days + 12 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 78 b3 dc 40  Error: UNC at LBA = 0x00dcb378 = 14463864

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 08 00 78 b3 dc 40 00      01:08:19.211  READ FPDMA QUEUED
  25 03 08 78 b3 dc 40 00      01:08:15.457  READ DMA EXT
  ef 03 45 68 b3 dc 00 00      01:08:15.457  SET FEATURES [Set transfer mode]
  ef 03 0c 68 b3 dc 00 00      01:08:15.457  SET FEATURES [Set transfer mode]
  ec 03 08 68 b3 dc 00 00      01:08:15.456  IDENTIFY DEVICE

Error 10 occurred at disk power-on lifetime: 492 hours (20 days + 12 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 78 b3 dc 4d  Error: UNC 8 sectors at LBA = 0x0ddcb378 = 232567672

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 03 08 78 b3 dc 40 00      01:08:15.457  READ DMA EXT
  ef 03 45 68 b3 dc 00 00      01:08:15.457  SET FEATURES [Set transfer mode]
  ef 03 0c 68 b3 dc 00 00      01:08:15.457  SET FEATURES [Set transfer mode]
  ec 03 08 68 b3 dc 00 00      01:08:15.456  IDENTIFY DEVICE
  ff ff ff ff ff ff ff 0c      01:08:15.455  [VENDOR SPECIFIC]

Error 9 occurred at disk power-on lifetime: 492 hours (20 days + 12 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 00 78 b3 dc 40  Error: UNC at LBA = 0x00dcb378 = 14463864

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 08 00 78 b3 dc 40 00      01:08:11.708  READ FPDMA QUEUED
  60 08 00 70 b3 dc 40 00      01:08:11.686  READ FPDMA QUEUED
  25 03 08 68 b3 dc 40 00      01:08:11.668  READ DMA EXT
  ef 03 45 00 b3 dc 00 00      01:08:11.668  SET FEATURES [Set transfer mode]
  ef 03 0c 00 b3 dc 00 00      01:08:11.667  SET FEATURES [Set transfer mode]

Error 8 occurred at disk power-on lifetime: 492 hours (20 days + 12 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 08 78 b3 dc 40  Error: UNC at LBA = 0x00dcb378 = 14463864

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 00 00 e8 b3 dc 40 00      01:08:07.918  READ FPDMA QUEUED
  60 80 08 68 b3 dc 40 00      01:08:07.918  READ FPDMA QUEUED
  60 40 00 28 b3 dc 40 00      01:08:07.918  READ FPDMA QUEUED
  60 20 00 08 b3 dc 40 00      01:08:07.907  READ FPDMA QUEUED
  25 03 08 00 b3 dc 40 00      01:08:07.890  READ DMA EXT

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%       586         -
# 2  Extended offline    Completed without error       00%       500         -
# 3  Extended offline    Aborted by host               90%       499         -
# 4  Short offline       Completed without error       00%       499         -
# 5  Extended offline    Completed: read failure       00%       489         769438584
# 6  Extended offline    Completed: read failure       00%       488         769438584
# 7  Extended offline    Aborted by host               90%       486         -
# 8  Short offline       Completed without error       00%       486         -
# 9  Short offline       Completed without error       00%       112         -
2 of 2 failed self-tests are outdated by newer successful extended offline self-test # 1

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

気づく:起動時間588である

~によるとこのリンク、属性現在進行中の部署count は現在不安定なセクタ数を示します。

user@host:~$ sudo smartctl -a -d sat /dev/sdg | grep "Current_Pending_Sector"
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       0

=>いいえ!

いよいよ…

user@host:~$ date ; badblocks -svn /dev/sdg ; date
samedi 13 mars 2021, 16:31:58 (UTC+0100)
Vérification des blocs défectueux dans un mode non destructif de lecture-
écriture
Du bloc 0 au bloc 488386583
Vérification des blocs défectueux (test non destructif de lecture-écriture)
Test en cours avec un motif aléatoire : complété                                             
Passe complétée, 0 blocs défectueux repérés. (0/0/0 erreurs)
dimanche 14 mars 2021, 09:48:53 (UTC+0100)

=>約17時間後、不良ブロックエラーがないと宣言してください!

だから私は私のドライブが実際にHSであり、リサイクルに適しているかどうかを知る方法を自分に尋ねました。

この分野に専門知識を持っている人はいますか?


私に行く、

長い形式(0で埋められる)を試してみました。ディスクGNOMEディスクユーティリティ)しかし、最初は「デバイスクリアエラー:/ dev / sdgに1048576バイト書き込みエラー:入力/出力エラー(udisks-error-quark、0)」というエラーが表示されます。だからフォーマットしようとしています。割れたそして、直接「/dev/sdgで読み込んでいる間、I/Oエラー」(フランス語から英語への翻訳)が発生しました。 msdosパーティションテーブルを追加しようとすると、「同期エラー/closing /dev/sdg:I / Oエラーターゲットホスト」が追加されました(フランス語から英語への翻訳)これで、gpartedからディスクが完全に消えます…

〜のようにインテリジェント制御(あなたが保証したように)すべてが大丈夫だと報告します。不良ブロック、私の考えでは、問題がドライブとPCコネクタの間のドライブに直接問題があるようには思えません。それで外付けドライブケースを分解してみました。 (手順は次のとおりです。これ)SATA-USBドックを使用してSATAドライブをテストしました。私も同じテストをしましたが、同じ結果が出ました。

私は問題がデバイス自体にあると推論し、ディスクをフォーマットし、工場バージョンを取得するためにクリーンアップする低レベルのユーティリティがないかどうかを諮問しました。ある瞬間、あきらめてレコードをリサイクルする私の姿を見ることができた。このトピックこれは関連していますHDパラメータ注文する...


表面的なテーマだけを勉強しました。1そして2このウェブサイト私のハードドライブのパスワードを見つけることができます(このパスワードはPASS変数に保存されます)。東芝ディスクは次のように構成されます。駐車スペース32台- はい、私も驚きました。)メーカーによって異なります。これらの説明では、私は実際に理解していないまま動作しているように見える行を愚かに適用しました。

user@host:~$ PASS=$( printf %32s )
user@host:~$ sudo hdparm -I /dev/sdg
...
Security: 
    Master password revision code = 65534
        supported
        enabled
        locked
    not frozen
    not expired: security count
        supported: enhanced erase
    Security level high
    108min for SECURITY ERASE UNIT. 108min for ENHANCED SECURITY ERASE UNIT. 
...

user@host:~$ sudo hdparm --user-master u --security-set-pass "$PASS" /dev/sdg
security_password: "                                "

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

user@host:~$ sudo hdparm -I /dev/sdg
...
Security: 
    Master password revision code = 65534
        supported
        enabled
        locked
    not frozen
    not expired: security count
        supported: enhanced erase
    Security level high
    108min for SECURITY ERASE UNIT. 108min for ENHANCED SECURITY ERASE UNIT. 
...

user@host:~$ date ; sudo hdparm --user-master u --security-erase "$PASS" /dev/sdg ; date
mardi 16 mars 2021, 19:22:49 (UTC+0100)
security_password: "                                "

/dev/sdg:
 Issuing SECURITY_ERASE command, password="                                ", user=user
mardi 16 mars 2021, 20:50:47 (UTC+0100)

user@host:~$ sudo hdparm -I /dev/sdg
...
Security: 
    Master password revision code = 65534
        supported
    not enabled
    not locked
    not frozen
    not expired: security count
        supported: enhanced erase
    108min for SECURITY ERASE UNIT. 108min for ENHANCED SECURITY ERASE UNIT. 
...

# enable -> not enabled AND locked -> not locked

user@host:~$ sudo hdparm --user-master m --security-unlock "$PASS" /dev/sdg
security_password: "                                "

/dev/sdg:
 Issuing SECURITY_UNLOCK command, password="                                ", user=master


user@host:~$ sudo hdparm --user-master m --security-disable "$PASS" /dev/sdg
security_password: "                                "

/dev/sdg:
 Issuing SECURITY_DISABLE command, password="                                ", user=master

私はこのコマンドで何かがロック解除されるという事実に驚きました(しかし何かはわかりません)。

  • gparted テスト MSDos パーティションテーブルの追加 + NTFS 形式 => 確認
  • Gnomeディスクテスト(長いフォーマット)=>確認
  • WindowsおよびLinuxでのファイル/フォルダの追加/削除テスト=>確認

警告:わからないHDパラメータ(そのコマンドがハードドライブに物理的にアクセスできなくなる可能性がある場合は、スマートフォンをブロックするのと同じです。)とにかく上記のコマンドを使用すると、最初に間違ったパスワードを使用したにもかかわらず(与えられたダミーパスワードを使用しました。) llformat") 何かが変更またはロック解除されました(何かは言えません)。だから発掘...

だから、すべてが正常に戻ったようです!

もし知っている人はいますか?HDパラメータ再び機能するように変更しますか?

ベストアンサー1

SMART値を見ると、ドライブは非常に良く見えます(100に正規化された値、低いほど悪い)。生の読み取りエラーがなく、再割り当てされたセクタはありません。

したがって、問題が発生した2回の間に何が起こったのか、おそらく他のことが起こっていたでしょう。ディレクトリのリストを見ると、データが記録されているように見えますが、データが正しくありません。セクタのあるRAMが破損しているか、USB転送が中断されたか、ファームウェアに興味深い競合状態があるか、まったく異なるものがある可能性があります。

これは時々起こる誤ったLBAを説明しないことに注意してください。そのセクタが再割り当てされると予想しましたが、ハードドライブを再フォーマットするときに上書きするだけで問題が解決する可能性があります。

LinuxでNTFSを使用している場合は、NTFS実装のバグにお金がかかります。長い間読み取り専用だったので、NTFSに正しい書き込みを実装することは決して簡単ではありません。

したがって、この場合は、何らかの理由でNTFSが必要でない限り、フォーマットをext4などに変更し、エラーが引き続き発生するかどうかを確認します。


LBAは「論理ブロックアドレス」を意味します。同じLBAを持つ不良セクタで停止する2つのオフラインテストがあります。

Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
...
# 5  Extended offline    Completed: read failure       00%       489         769438584
# 6  Extended offline    Completed: read failure       00%       488         769438584

したがって、その特定のセクタを読み取ることはできません。ただし、再割り当てされていないため(再割り当て回数がゼロ)、再フォーマット中に作成され、読み取り失敗の問題が解決されたとします。


ドライブを分解して別のSATA-USBステーションでテストするのは良いテストです。これは、内部SATA-USBアダプタに問題がないことを意味します。

ATA SECURE ERASEは実際には低レベルのフォーマットを実行せず、各ブロックを書き込むだけです。私が知っている限り、最新のドライブを低レベルにフォーマットする方法はありません。

dmesgディスクを読み書きしようとしましたが、失敗したときに/var/log/syslog実際のエラーメッセージを表示するのは面白いでしょう。これが私のドライブの場合、次のステップはddブロックを直接読み書きするツールを使用することです。sg3_utils特に、再割り当てされたことを確認するために読み取れないブロックを作成してみました。

しかし、すでにセキュリティの削除を開始している場合は、今は遅すぎると思います。セキュリティ削除完了後、必ずSMART値を再確認してください。

おすすめ記事