我有一个 2TB 的外置 WD 硬盘,自从我在笔记本电脑上运行 Windows 以来,我就用它来备份和播放电影/音乐等。为了安全起见,我卸载了硬盘,并使用 smartctl 运行了一个简短的测试,结果显示已完成:读取错误 90%
$ sudo smartctl -l selftest /dev/sdc
smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.4.0-36-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 Short offline Completed: read failure 90% 4876 9938552
2 Short offline Completed: read failure 90% 4876 9938552
为了解决这个问题,我运行ntfsfix
$ sudo ntfsfix /dev/sdc
Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
The alternate bootsector is usable
Set sector count to 3906963455 instead of 3906961407
Rewriting the bootsector
The boot sector has been rewritten
ntfs_mst_post_read_fixup_warn: magic: 0xffffffff size: 1024 usa_ofs: 65535 usa_count: 65534: Invalid argument
Record 0 has no FILE magic (0xffffffff)
Failed to load $MFT: Input/output error
Volume is corrupt. You should run chkdsk.
现在该驱动器不再可在磁盘实用程序上安装。
dmseg | tail
返回结果如下:
[ 1697.980340] scsi 7:0:0:1: Enclosure WD SES Device 1019 PQ: 0 ANSI: 6
[ 1697.982222] sd 7:0:0:0: Attached scsi generic sg3 type 0
[ 1697.982287] sd 7:0:0:0: [sdc] 3906963456 512-byte logical blocks: (2.00 TB/1.82 TiB)
[ 1697.982518] ses 7:0:0:1: Attached Enclosure device
[ 1697.982673] sd 7:0:0:0: [sdc] Write Protect is off
[ 1697.982684] sd 7:0:0:0: [sdc] Mode Sense: 47 00 10 08
[ 1697.982686] ses 7:0:0:1: Attached scsi generic sg4 type 13
[ 1697.983481] sd 7:0:0:0: [sdc] No Caching mode page found
[ 1697.983490] sd 7:0:0:0: [sdc] Assuming drive cache: write through
[ 1711.399946] sd 7:0:0:0: [sdc] Attached SCSI disk
我考虑过直接从终端安装驱动器,但我真的不能丢失此驱动器上的数据,也不想再犯错误。我该怎么做才能解决这个问题?请记住,我对 Linux 还很陌生。谢谢
答案1
我已修复该问题并安装驱动器。
发布我如何修复它,以防其他人遇到类似的问题。
我安装了 testdisk 并运行了它
sudo apt-get install testdisk sudo testdisk
并基本上按照说明进行操作,首先选择分析,这向我展示了问题并应用了修复。重新启动系统,外部硬盘运行良好。数据完好无损。