我的西部数据硬盘最近无法被 Ubuntu 系统识别。它似乎有错误扇区。如何从中恢复数据?

我的西部数据硬盘最近无法被 Ubuntu 系统识别。它似乎有错误扇区。如何从中恢复数据?

我的台式机装有 Ubuntu 20.0.4 系统,里面有一块 6T 内置硬盘。以前用起来还好,但最近发生了两次系统无法识别(卸载)的情况。第一次发生时,我重启了几次电脑,硬盘终于出现在系统中。但第二次发生时,重启根本不起作用。

我也尝试了外部桌面驱动器读取器,但仍然不起作用。在 ubuntu 下打开“磁盘”功能时,我可以在磁盘列表中看到此磁盘,但它已被卸载。见下图 在此处输入图片描述

我还使用了smartctl工具进行磁盘分析,结果如下:

sudo smartctl -a /dev/sdc
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-6.2.0-26-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Red
Device Model:     WDC WD60EFRX-68MYMN1
Serial Number:    WD-WXL1H84DWLHK
LU WWN Device Id: 5 0014ee 260be9614
Firmware Version: 82.00A82
User Capacity:    6,001,175,126,016 bytes [6.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5700 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Thu Jan 18 13:13:03 2024 PST
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:  (0x00) Offline data collection activity
                    was never started.
                    Auto Offline Data Collection: Disabled.
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:        ( 7004) seconds.
Offline data collection
capabilities:            (0x7b) SMART execute Offline immediate.
                    Auto Offline data collection on/off support.
                    Suspend Offline collection upon new
                    command.
                    Offline surface scan supported.
                    Self-test supported.
                    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:    ( 723) minutes.
Conveyance self-test routine
recommended polling time:    (   5) minutes.
SCT capabilities:          (0x303d) 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     0x002f   200   196   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   206   202   021    Pre-fail  Always       -       8683
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       164
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   100   253   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   004   004   000    Old_age   Always       -       70540
 10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       164
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       158
193 Load_Cycle_Count        0x0032   179   179   000    Old_age   Always       -       65008
194 Temperature_Celsius     0x0022   129   106   000    Old_age   Always       -       23
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       22
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   000    Old_age   Offline      -       0

SMART Error Log Version: 1
ATA Error Count: 1
    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 1 occurred at disk power-on lifetime: 5002 hours (208 days + 10 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 01 00 00 00 40  Error: UNC at LBA = 0x00000000 = 0

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  40 00 01 00 00 00 40 00      00:03:44.379  READ VERIFY SECTOR(S)
  ef 10 02 00 00 00 00 00      00:03:44.127  SET FEATURES [Enable SATA feature]
  ef 02 00 00 00 00 00 00      00:03:44.127  SET FEATURES [Enable write cache]
  ef aa 00 00 00 00 00 00      00:03:44.127  SET FEATURES [Enable read look-ahead]
  ef 03 46 00 00 00 00 00      00:03:44.127  SET FEATURES [Set transfer mode]

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

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.

因此,我很乐意听取有关如何使系统识别该磁盘并恢复其上数据的任何建议。

谢谢你!

答案1

买家需谨慎。尤其是当这是硬件故障时。

也许值得testdisk一试?我遵循的方法来自这是 Foss并处理恢复已删除的文件。您的步骤(如果 Testdisk 可以看见驱动器)会略有不同。

我只用它来恢复意外删除的文件在职的外部硬盘和 SD 卡,但它也有能力帮助从无法启动、损坏的驱动器中检索文件,并且文章也提供了一些这方面的指示。

安装

sudo apt install testdisk

然后运行

testdisk

Testdisk 完全通过终端运行,没有 GUI 组件。因此,拔掉其他硬盘驱动器以方便您找到所需内容是值得的,但您确实需要在每个步骤中仔细阅读它们提供的信息。

答案2

使用 ``dd'' 克隆磁盘

 sudo dd if=/dev/sdc of=/tmp/disk.img bs=8M status=progress oflag=direct  
安装最重要的文件恢复

sudo apt install foremost

在磁盘映像上运行 foremost 并使用 `-o' 选项将找到的文件保存到目录中

foremost -o /tmp/formost/ -v -t all /tmp/disk.img

相关内容