我最近买了一个外置硬盘,用于我的 Linux 笔记本。硬盘的规格是 USB 3.0,而笔记本仅支持 USB 2.0。
当我插入驱动器时,它似乎工作正常。这是 /var/log/messages 中的相关部分:
Jun 17 20:36:53 mosquito kernel: usb 1-4: new high-speed USB device number 8 using ehci_hcd
Jun 17 20:36:53 mosquito kernel: scsi8 : usb-storage 1-4:1.0
Jun 17 20:36:53 mosquito mtp-probe: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-4"
Jun 17 20:36:53 mosquito mtp-probe: bus: 1, device: 8 was not an MTP device
Jun 17 20:36:59 mosquito kernel: scsi 8:0:0:0: Direct-Access BUFFALO HD-PNTU3 0001 PQ: 0 ANSI: 6
Jun 17 20:36:59 mosquito kernel: sd 8:0:0:0: Attached scsi generic sg1 type 0
Jun 17 20:36:59 mosquito kernel: sd 8:0:0:0: [sdb] 1953463728 512-byte logical blocks: (1.00 TB/931 GiB)
Jun 17 20:36:59 mosquito kernel: sd 8:0:0:0: [sdb] Write Protect is off
Jun 17 20:36:59 mosquito kernel: sd 8:0:0:0: [sdb] Mode Sense: 1f 00 00 08
Jun 17 20:36:59 mosquito kernel: sd 8:0:0:0: [sdb] No Caching mode page present
Jun 17 20:36:59 mosquito kernel: sd 8:0:0:0: [sdb] Assuming drive cache: write through
Jun 17 20:36:59 mosquito kernel: sd 8:0:0:0: [sdb] No Caching mode page present
Jun 17 20:36:59 mosquito kernel: sd 8:0:0:0: [sdb] Assuming drive cache: write through
Jun 17 20:36:59 mosquito kernel: sdb: sdb1
Jun 17 20:36:59 mosquito kernel: sd 8:0:0:0: [sdb] No Caching mode page present
Jun 17 20:36:59 mosquito kernel: sd 8:0:0:0: [sdb] Assuming drive cache: write through
Jun 17 20:36:59 mosquito kernel: sd 8:0:0:0: [sdb] Attached SCSI disk
Jun 17 20:36:59 mosquito ata_id[7293]: HDIO_GET_IDENTITY failed for '/dev/.tmp-block-8:16'
Jun 17 20:37:16 mosquito ntfs-3g[7305]: Version 2012.1.15 external FUSE 28
Jun 17 20:37:16 mosquito ntfs-3g[7305]: Mounted /dev/sdb1 (Read-Write, label "HD-PNTU3", NTFS 3.1)
Jun 17 20:37:16 mosquito ntfs-3g[7305]: Cmdline options: rw,nosuid,nodev,uhelper=udisks
Jun 17 20:37:16 mosquito ntfs-3g[7305]: Mount options: rw,nosuid,nodev,uhelper=udisks,allow_other,nonempty,relatime,fsname=/dev/sdb1,blkdev,blksize=4096
Jun 17 20:37:16 mosquito ntfs-3g[7305]: Ownership and permissions disabled, configuration type 7
我可以将文件复制到驱动器,一切似乎都运行正常。但是,一旦卸载驱动器,我就会收到以下日志输出:
Jun 17 20:37:23 mosquito ntfs-3g[7305]: Unmounting /dev/sdb1 (HD-PNTU3)
Jun 17 20:37:23 mosquito ata_id[7324]: HDIO_GET_IDENTITY failed for '/dev/sdb'
Jun 17 20:37:24 mosquito kernel: sd 8:0:0:0: [sdb] Device not ready
Jun 17 20:37:24 mosquito kernel: sd 8:0:0:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
Jun 17 20:37:24 mosquito kernel: sd 8:0:0:0: [sdb] Sense Key : 0x2 [current]
Jun 17 20:37:24 mosquito kernel: sd 8:0:0:0: [sdb] ASC=0x3a ASCQ=0x0
Jun 17 20:37:24 mosquito kernel: sd 8:0:0:0: [sdb] CDB: cdb[0]=0x28: 28 00 74 6f 7d 00 00 00 08 00
Jun 17 20:37:24 mosquito kernel: end_request: I/O error, dev sdb, sector 1953463552
Jun 17 20:37:24 mosquito kernel: quiet_error: 200 callbacks suppressed
Jun 17 20:37:24 mosquito kernel: Buffer I/O error on device sdb, logical block 244182944
这个过程会重复进行,部分之后的值会发生变化logical block
,有时甚至不需要Buffer I/O error [...]
线。
当我尝试再次安装驱动器时,错误再次出现,并且安装告诉我它无法读取超级块。只有在我拔出驱动器并重新插入后,问题才会消失。
这可能是什么原因造成的?这可能是驱动程序或兼容性问题,还是磁盘故障?我该如何验证这一点?
答案1
当我弹出驱动器时,大多数 USB 存储设备都会出现这种情况。
您是通过命令行自己卸载分区,还是单击“卸载/弹出驱动器”?
简单地卸载分区不会导致这种情况,而弹出分区会阻止我重新安装,除非我断开连接并重新连接。
您可以使用以下命令“重置”驱动器的可安装性(!)零件探测。它位于'分开' 包裹。
通常必须以 root 身份运行才能执行重置(嗯,就像重置一样)。
sudo partprobe
将刷新所有连接的设备,同时
sudo partprobe /dev/sdc
将重置/刷新 sdc 设备上的分区。