对无响应的外部硬盘进行故障排除;“暂停”Linux

对无响应的外部硬盘进行故障排除;“暂停”Linux

我有一个 My Passport 1.8 Tb 外置硬盘,连接后 Windows 突然崩溃。这意味着我无法访问我的文件,我想恢复它们。

当然,我使用 Linux 进行进一步检查。我尝试使用 dd 制作硬盘映像,但它没有响应。

当我将其连接到 Linux 时,HDD 中的小灯开始闪烁。我运行 lsblk 并发现该设备被分配为 sda/sda1,并正确将其标识为 1,8 Tb 驱动器:

NAME                    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0                     7:0    0  86,5M  1 loop  /snap/core/4407
loop1                     7:1    0   240M  1 loop  /snap/pycharm-community/60
loop2                     7:2    0 162,6M  1 loop  /snap/spotify/6
loop4                     7:4    0 239,1M  1 loop  /snap/pycharm-community/56
loop5                     7:5    0 162,1M  1 loop  /snap/spotify/13
loop6                     7:6    0 239,1M  1 loop  /snap/pycharm-community/58
loop7                     7:7    0  81,7M  1 loop  /snap/core/4206
loop8                     7:8    0 159,5M  1 loop  /snap/spotify/5
loop9                     7:9    0  86,6M  1 loop  /snap/core/4486
sda                       8:0    0   1,8T  0 disk  
└─sda1                    8:1    0   1,8T  0 part  
sr0                      11:0    1  1024M  0 rom   
nvme0n1                 259:0    0 238,5G  0 disk  
├─nvme0n1p1             259:1    0   512M  0 part  /boot/efi
├─nvme0n1p2             259:2    0   732M  0 part  /boot
└─nvme0n1p3             259:3    0 237,3G  0 part  
  └─nvme0n1p3_crypt     253:0    0 237,3G  0 crypt 
    ├─ubuntu--vg-root   253:1    0 221,3G  0 lvm   /
    └─ubuntu--vg-swap_1 253:2    0  15,9G  0 lvm   [SWAP]

然后我运行 fdisk 检查磁盘分区。这时麻烦就开始了。它列出了上面的一些设备,然后就停止了:

Disk /dev/loop0: 86,5 MiB, 90726400 bytes, 177200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 240 MiB, 251596800 bytes, 491400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 162,6 MiB, 170479616 bytes, 332968 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 239,1 MiB, 250728448 bytes, 489704 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 162,1 MiB, 169943040 bytes, 331920 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 239,1 MiB, 250712064 bytes, 489672 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 81,7 MiB, 85692416 bytes, 167368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/nvme0n1: 238,5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B11D4080-4B1D-40F6-B9A7-064AD170450B

Device           Start       End   Sectors   Size Type
/dev/nvme0n1p1    2048   1050623   1048576   512M EFI System
/dev/nvme0n1p2 1050624   2549759   1499136   732M Linux filesystem
/dev/nvme0n1p3 2549760 500117503 497567744 237,3G Linux filesystem




Disk /dev/mapper/nvme0n1p3_crypt: 237,3 GiB, 254752587776 bytes, 497563648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

我尝试了无数其他故障排除程序,但每个命令(如 badblocks)都没有响应。此外,当我断开硬盘连接时,Linux 会“暂停”几秒钟。也就是说,屏幕变黑,然后重新出现。

对于进一步行动有什么建议吗?

编辑:

按照建议使用 journalctl --follow 命令,连接设备后我得到了以下回复:

scsi 5:0:0:0: Direct-Access     WD       My Passport 259D 1005 PQ: 0 ANSI: 6
scsi 5:0:0:1: Enclosure         WD       SES Device       1005 PQ: 0 ANSI: 6
sd 5:0:0:0: Attached scsi generic sg1 type 0
ses 5:0:0:1: Attached Enclosure device
ses 5:0:0:1: Attached scsi generic sg2 type 13
ses 5:0:0:1: Failed to get diagnostic page 0x8000002
ses 5:0:0:1: Failed to bind enclosure -19
sd 5:0:0:0: [sda] Spinning up disk...

ready
sd 5:0:0:0: [sda] 3906963456 512-byte logical blocks: (2.00 TB/1.82 TiB)
sd 5:0:0:0: [sda] Write Protect is off
sd 5:0:0:0: [sda] Mode Sense: 53 00 10 08
sd 5:0:0:0: [sda] No Caching mode page found
sd 5:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 5:0:0:0: [sda] Attached SCSI disk
gnome-shell[1339]: Unable to mount volume My Passport: Gio.IOErrorEnum: Error mounting /dev/sda1 at /media/dpa/My Passport: Command-line `mount -t "ntfs" -o

断开连接时我收到了通知,并给出了一个小提示?

"uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda1" "/media/dpa/My Passport"' exited with non-zero exit status 13: The disk contains an unclean file system (0, 1).
                                                  The file system wasn't safely closed on Windows. Fixing.
                                                  ntfs_attr_pread_i: ntfs_pread failed: Input/output error
                                                  Failed to read NTFS $Bitmap: Input/output error
                                                  NTFS is either inconsistent, or there is a hardware fault, or it's a
                                                  SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
                                                  then reboot into Windows twice. The usage of the /f parameter is very
                                                  important! If the device is a SoftRAID/FakeRAID then first activate
                                                  it and mount a different device under the /dev/mapper/ directory, (e.g.
                                                  /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
                                                  for more details.
                                                  Failed to sync device /dev/sda1: Input/output error
                                                  Failed to close volume /dev/sda1: Input/output error
systemd-udevd[21064]: inotify_add_watch(9, /dev/sda1, 10) failed: No such file or directory

相关内容