我有一个 2 TB 外部 USB HDD 备份驱动器。当我使用 nautilus(GUI 文件浏览器)复制一些文件时,电源线被拉断,但没有完全脱落。然而,通信以某种方式中断了(我不确定它是否完全断开或完全失去连接)。可以说写入失败。
现在我似乎无法再次安装它,dmesg
在我授权设备后显示以下内容usbguard
[ 849.092387] usb-storage 4-2:1.0: USB Mass Storage device detected
[ 849.092639] scsi host0: usb-storage 4-2:1.0
[ 849.092739] usb 4-2: authorized to connect
[ 850.104040] scsi 0:0:0:0: Direct-Access WD Drive 2657 1030 PQ: 0 ANSI: 6
[ 850.104233] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 850.105371] sd 0:0:0:0: [sda] Spinning up disk...
[ 851.127185] ......
...
[ 858.295189] ......not responding...
我听到设备旋转,然后发出大约 3 次相当令人讨厌(但相当安静)的噪音
我没有看到它/media
,我什至没有看到任何带有标签的sda
东西/dev
。我尝试在启动 Windows 时插入驱动器并尝试对其进行诊断,但没有真正得到任何结果。我知道这里有些人说过,有时这些设备会创建一个垃圾文件,该文件在拔出插头时写入错误或出现其他问题,从而导致问题。我以前见过该文件,但如果这是问题所在,我什至无法得到它,因为我什至看不到磁盘的文件夹!
这条消息实际上是我所拥有的一切,根据计算机,它甚至存在
更新0:
我确实看到了这一点,/sys/kernel/debug/usb/devices
感谢这个答案:
T: Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 6 Spd=5000 MxCh= 0
D: Ver= 3.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs= 1
P: Vendor=1058 ProdID=2657 Rev=10.30
S: Manufacturer=Western Digital
S: Product=Drive 2657
S: SerialNumber=i removed it from here
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=896mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
我已经确定了设备中的位置/dev
,但它无法安装,并且它说它不是块设备(我放入XYZ
数字的位置)
mount: /dev/bus/usb/XYZ/XYZ: /tmp/fix-drive is not a block device.
更新1:
我认为硬件没问题,@Brad,下面指出了一种验证方法,如果我这样做,lsblk
它会显示为 ansda
并且显示为lsusb
。我不知道如何让它在类似的情况下显示为块设备/dev/sda
(显然只有顶级目录/dev/
是块设备)。
更新2:
如果我将其放置一段时间,lsblk
则会看到它,/dev/sda
并且该文件夹会出现在 中/dev/sda
。如果我尝试安装它,我会得到:
mount: /tmp/fix-drive: can't read superblock on /dev/sda.
如果我跑,
sudo fdisk -l /dev/sda
我会
fdisk: cannot open /dev/sda: No such file or directory
的输出lsblk
是:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 0B 0 disk
nvme0n1 259:0 0 476.9G 0 disk
├─nvme0n1p1 259:1 0 260M 0 part
├─nvme0n1p2 259:2 0 16M 0 part
├─nvme0n1p3 259:3 0 78.3G 0 part
├─nvme0n1p4 259:4 0 500M 0 part /boot/efi
├─nvme0n1p5 259:5 0 392.5G 0 part /
├─nvme0n1p6 259:6 0 4.4G 0 part
└─nvme0n1p8 259:7 0 1000M 0 part
附加日志dmesg
继续之前
[10321.876237] .............not responding...
[10514.168814] sd 0:0:0:0: [sda] tag#0 timing out command, waited 180s
[10694.180757] sd 0:0:0:0: [sda] tag#0 timing out command, waited 180s
[10874.188908] sd 0:0:0:0: [sda] tag#0 timing out command, waited 180s
[10874.188970] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=DID_OK driverbyte=DRIVER_OK
[10874.188988] sd 0:0:0:0: [sda] Sense Key : Hardware Error [current]
[10874.189020] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81
[10874.189043] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
[10874.189053] sd 0:0:0:0: [sda] 0-byte physical blocks
[11054.200777] sd 0:0:0:0: [sda] tag#0 timing out command, waited 180s
[11054.200829] sd 0:0:0:0: [sda] Test WP failed, assume Write Enabled
[11234.212778] sd 0:0:0:0: [sda] tag#0 timing out command, waited 180s
[11234.212810] sd 0:0:0:0: [sda] Asking for cache data failed
[11234.212815] sd 0:0:0:0: [sda] Assuming drive cache: write through
[11234.213392] sd 0:0:0:0: [sda] Attached SCSI disk
[11264.324770] sd 0:0:0:0: [sda] tag#0 timing out command, waited 30s
[12373.688612] /tmp/fix-drive: Can't open blockdev
[12381.408079] sd 0:0:0:0: [sda] tag#0 access beyond end of device
[12381.408086] I/O error, dev sda, sector 2 op 0x0:(READ) flags 0x1000 phys_seg 1 prio class 3
[12381.408102] EXT4-fs (sda): unable to read superblock
似乎认为驱动器大小为 0b
更新3:
我拆卸了外壳,对于这个模型来说,这是一个混乱的过程,需要破坏部分塑料外壳。我取出 PCB 并测试连接器上的引脚与其在板上的安装/焊接位置之间的连续性。它们似乎都有连续性。可以肯定的是,我随后测试了引脚和表面贴装电阻器之间的连续性,这些电阻器似乎也具有连接性。它们似乎都与某些表面贴装电路元件具有连续性。大多数都有电阻器,这些电阻器似乎也被分配给它们并且与它们具有连续性。
我还能做些什么来诊断主板吗?
更新3.1:
更完整的日志(但不尝试挂载)
[ 138.351630] sd 0:0:0:0: [sda] Spinning up disk...
[ 236.649461] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 236.649467] sd 0:0:0:0: [sda] Sense not available.
[ 236.649473] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
[ 236.649474] sd 0:0:0:0: [sda] 0-byte physical blocks
[ 236.649478] sd 0:0:0:0: [sda] Write Protect is off
[ 236.649480] sd 0:0:0:0: [sda] Mode Sense: 00 00 00 00
[ 236.649482] sd 0:0:0:0: [sda] Asking for cache data failed
[ 236.649487] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 236.649920] sd 0:0:0:0: [sda] Attached SCSI disk
[ 243.591423] sd 0:0:0:0: [sda] Spinning up disk...
[ 262.021407] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 262.021410] sd 0:0:0:0: [sda] Sense not available.
[ 262.021415] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
[ 262.021416] sd 0:0:0:0: [sda] 0-byte physical blocks
[ 262.021419] sd 0:0:0:0: [sda] Write Protect is off
[ 262.021421] sd 0:0:0:0: [sda] Mode Sense: 00 00 00 00
[ 262.021424] sd 0:0:0:0: [sda] Asking for cache data failed
[ 262.021431] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 262.021874] sd 0:0:0:0: [sda] Attached SCSI disk
[ 296.295799] sd 0:0:0:0: [sda] Spinning up disk...
[ 524.427980] sd 0:0:0:0: [sda] tag#0 timing out command, waited 180s
[ 704.434027] sd 0:0:0:0: [sda] tag#0 timing out command, waited 180s
[ 884.451408] sd 0:0:0:0: [sda] tag#0 timing out command, waited 180s
[ 884.451448] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=DID_OK driverbyte=DRIVER_OK
[ 884.451452] sd 0:0:0:0: [sda] Sense Key : Hardware Error [current]
[ 884.451455] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81
[ 884.451459] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
[ 884.451461] sd 0:0:0:0: [sda] 0-byte physical blocks
[ 1064.460333] sd 0:0:0:0: [sda] tag#0 timing out command, waited 180s
[ 1064.460378] sd 0:0:0:0: [sda] Test WP failed, assume Write Enabled
[ 1244.464759] sd 0:0:0:0: [sda] tag#0 timing out command, waited 180s
[ 1244.464803] sd 0:0:0:0: [sda] Asking for cache data failed
[ 1244.464809] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 1244.465165] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1274.533228] sd 0:0:0:0: [sda] tag#0 timing out command, waited 30s
答案1
这不是一件容易的事,但这里有一些建议:
在您首先确保硬件(块设备)对内核可见之前,不要尝试挂载它。为此,请将其插入没有安装它。然后:
- 尝试
lsblk
看看你是否能看到sda
那里。 - 尝试
lsusb
看看它是否出现在那里。
如果这些都没有显示块设备(例如,sda
),那么您可能已经损坏了硬件。根据恢复的重要性,您可能需要尝试另一根电缆(它是否损坏?),或者打开外部驱动器并提取实际的从外壳开车。然后尝试使用外部驱动器附带的替代 USB 连接器 - 类似于这也许。
最终,您希望能够/dev/sda
先看到。一旦达到这一点,安装方面的挑战就开始了...如果您可以看到设备,但它仍然无法安装,那么您可以尝试使用名为的工具解救。这会将块设备上的数据进行非常低级别的复制到另一个驱动器(例如,PC 中的主驱动器,或者可能是另一个外部驱动器)。它足够聪明,可以跳过块设备上的可疑部分,然后提供用于将文件从驱动器恢复到另一个驱动器的工具。
最终,这在很大程度上取决于驱动器上数据的价值。如果您不关心它,fdisk
一旦可以看到块设备,您可以尝试重新格式化驱动器,否则您可能会陷入困境。
还有其他工具可以一起使用ddrescue
,可以帮助恢复某些类型的文件 - 例如photorec
可以用于从ddrescue
生成的图像中恢复图像。
祝你好运!