可移动驱动器不断掉落/卸载

可移动驱动器不断掉落/卸载

我插入 1TB 可移动硬盘,Ubuntu 将其挂载。我开始提取 45GB 的 7z 压缩照片,一段时间后(大约 10 分钟),硬盘卸载,提取失败。

我怎样才能停止驱动器卸载?

我读了一些得出这个结论的帖子,然后卸载了 laptop-mode-tools,但这并没有帮助。

dmesg 提供此输出。

[  372.444377] Buffer I/O error on device sdb1, logical block 31323601
[  372.444384] sd 4:0:0:0: rejecting I/O to offline device
[  372.444389] sd 4:0:0:0: [sdb] killing request
[  372.444396] sd 4:0:0:0: rejecting I/O to offline device
[  372.444411] sd 4:0:0:0: [sdb] Unhandled error code
[  372.444413] sd 4:0:0:0: [sdb]  
[  372.444414] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[  372.444416] sd 4:0:0:0: [sdb] CDB: 
[  372.444417] Read(10): 28 00 0e ef af 6f 00 00 20 00
[  372.444424] end_request: I/O error, dev sdb, sector 250589039
[  372.444441] usb 2-1.2: USB disconnect, device number 95
[  372.444450] sd 4:0:0:0: rejecting I/O to offline device
[  372.523846] usb 2-1.2: new high-speed USB device number 96 using ehci-pci
[  387.602089] usb 2-1.2: device descriptor read/64, error -110

我的 fstab 非常简单

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sda1 during installation
UUID=6da37d02-881e-455f-8f1a-93db2ddc7f3c /boot           ext2    defaults     $
/dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0

我已将其添加到 fstab 中,以便始终以相同的方式挂载它。

UUID=16D48A3ED48A205B /media/imation ntfs user,noauto,rw 0 0

dmesg | tail 提供此功能。

sayth:~$ dmesg | tail
[  687.791103] Buffer I/O error on device sdb1, logical block 31310276
[  687.791106] Buffer I/O error on device sdb1, logical block 31310277
[  687.791109] Buffer I/O error on device sdb1, logical block 31310278
[  687.791113] Buffer I/O error on device sdb1, logical block 31310279
[  687.791165] sd 4:0:0:0: rejecting I/O to offline device
[  687.791170] usb 2-1.2: USB disconnect, device number 3
[  687.942519] usb 2-1.2: new high-speed USB device number 4 using ehci-pci
[  703.020594] usb 2-1.2: device descriptor read/64, error -110
[  718.206700] usb 2-1.2: device descriptor read/64, error -110
[  718.382767] usb 2-1.2: new high-speed USB device number 5 using ehci-pci

而且 fsck 也帮不上忙,我真的没有主意了。

sayth:~$ fsck /dev/sdb1
fsck from util-linux 2.20.1
fsck: fsck.ntfs: not found
fsck: error 2 while executing fsck.ntfs for /dev/sdb1

答案1

听起来你的驱动器已损坏:

[  372.444424] end_request: I/O error, dev sdb, sector 250589039

您可以尝试以下操作:

  1. 将驱动器连接到 Windows 计算机并在那里运行检查磁盘。在 Windows 下,NTFS 检查可能更好(这是假设)。

  2. 运行ntfsck。在 Debian 系统上,/sbin/fsck.ntfs是 的符号链接/bin/ntfsfix,但在 Ubuntu 上似乎并非如此。因此,您需要ntfsck手动运行。这应该已经安装,但如果没有,请使用 进行安装sudo apt-get install ntfs-3g。然后运行

    sudo ntfsfix /dev/sdb1
    
  3. 用于smartctl显示驱动器的 SMART 状态:

    sudo smartctl /dev/sdb
    

    这虽然不能解决任何问题但可能有助于调试问题。

相关内容