大家好,我有两个相同的 USB 驱动器,它们的行为完全错误......
复制一堆文件后,我卸载了它们,在等待写入缓存 15 分钟后(奇怪的是,CPU 负载为零),我放弃了,只是删除了驱动器。
现在它们根本无法使用。我本以为有些文件不存在(因为没有写入),但没有以下行为:
lsusb
在安装任一驱动器之前输出
Bus 008 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 24ae:1100
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 05e3:0745 Genesys Logic, Inc. Logilink CR0012
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 17ef:6082 Lenovo
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
现在(请注意,大约需要 5 秒的时间才能看到 lsusb 输出出现任何差异,因此我必须运行该命令几次(实际上为什么?))
Bus 008 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge
Bus 008 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 007 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 24ae:1100
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 05e3:0745 Genesys Logic, Inc. Logilink CR0012
Bus 001 Device 008: ID ffff:1201
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 17ef:6082 Lenovo
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
我知道 ID 为 24ae:1100 的设备是读卡器,所以 ffff:1201 一定是笔式驱动器。
lsscsi -s
插入介质之前的输出:
[0:0:0:0] cd/dvd ASUS DRW-24D5MT 1.10 /dev/sr0 -
[2:0:0:0] disk ATA ST1000DM003-1SB1 CC43 /dev/sda 1.00TB
[3:0:0:0] disk ATA INTENSO SATA III 61.3 /dev/sdb 240GB
[6:0:0:0] disk Intenso USB 3.0 Device 0 /dev/sdc 500GB
[7:0:0:0] disk Generic STORAGE DEVICE 0903 /dev/sdd -
之后:
[0:0:0:0] cd/dvd ASUS DRW-24D5MT 1.10 /dev/sr0 -
[2:0:0:0] disk ATA ST1000DM003-1SB1 CC43 /dev/sda 1.00TB
[3:0:0:0] disk ATA INTENSO SATA III 61.3 /dev/sdb 240GB
[6:0:0:0] disk Intenso USB 3.0 Device 0 /dev/sdc 500GB
[7:0:0:0] disk Generic STORAGE DEVICE 0903 /dev/sdd -
[8:0:0:0] disk NAND USB2DISK 0.00 /dev/sde -
显然它正在检测随身碟,只是无法确定它的大小。
系统日志文件的末尾是:
Oct 15 17:17:01 DESKTOP CRON[6093]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Oct 15 17:22:13 DESKTOP kernel: [ 3055.640984] usb 1-3: new high-speed USB device number 8 using ehci-pci
Oct 15 17:22:13 DESKTOP kernel: [ 3055.797273] usb 1-3: New USB device found, idVendor=ffff, idProduct=1201, bcdDevice= 0.00
Oct 15 17:22:13 DESKTOP kernel: [ 3055.797278] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Oct 15 17:22:13 DESKTOP kernel: [ 3055.797692] usb-storage 1-3:1.0: USB Mass Storage device detected
Oct 15 17:22:13 DESKTOP kernel: [ 3055.798138] scsi host8: usb-storage 1-3:1.0
Oct 15 17:22:13 DESKTOP mtp-probe: checking bus 1, device 8: "/sys/devices/pci0000:00/0000:00:12.2/usb1/1-3"
Oct 15 17:22:13 DESKTOP mtp-probe: bus: 1, device: 8 was not an MTP device
Oct 15 17:22:14 DESKTOP upowerd[1603]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0
Oct 15 17:22:14 DESKTOP upowerd[1603]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:12.2/usb1/1-3
Oct 15 17:22:14 DESKTOP kernel: [ 3056.813556] scsi 8:0:0:0: Direct-Access NAND USB2DISK 0.00 PQ: 0 ANSI: 4
Oct 15 17:22:14 DESKTOP kernel: [ 3056.814000] sd 8:0:0:0: Attached scsi generic sg5 type 0
Oct 15 17:22:14 DESKTOP kernel: [ 3056.816168] sd 8:0:0:0: [sde] Attached SCSI removable disk
Oct 15 17:25:28 DESKTOP kernel: [ 3250.754042] usb 1-3: USB disconnect, device number 8
Oct 15 17:25:29 DESKTOP upowerd[1603]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0
Oct 15 17:25:29 DESKTOP upowerd[1603]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:12.2/usb1/1-3
Oct 15 17:26:15 DESKTOP kernel: [ 3297.441199] usb 1-3: new high-speed USB device number 9 using ehci-pci
Oct 15 17:26:15 DESKTOP kernel: [ 3297.597388] usb 1-3: New USB device found, idVendor=ffff, idProduct=1201, bcdDevice= 0.00
Oct 15 17:26:15 DESKTOP kernel: [ 3297.597393] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Oct 15 17:26:15 DESKTOP kernel: [ 3297.597842] usb-storage 1-3:1.0: USB Mass Storage device detected
Oct 15 17:26:15 DESKTOP kernel: [ 3297.600635] scsi host8: usb-storage 1-3:1.0
Oct 15 17:26:15 DESKTOP mtp-probe: checking bus 1, device 9: "/sys/devices/pci0000:00/0000:00:12.2/usb1/1-3"
Oct 15 17:26:15 DESKTOP mtp-probe: bus: 1, device: 9 was not an MTP device
Oct 15 17:26:15 DESKTOP upowerd[1603]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0
Oct 15 17:26:15 DESKTOP upowerd[1603]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:12.2/usb1/1-3
Oct 15 17:26:16 DESKTOP kernel: [ 3298.622108] scsi 8:0:0:0: Direct-Access NAND USB2DISK 0.00 PQ: 0 ANSI: 4
Oct 15 17:26:16 DESKTOP kernel: [ 3298.622653] sd 8:0:0:0: Attached scsi generic sg5 type 0
Oct 15 17:26:16 DESKTOP kernel: [ 3298.625530] sd 8:0:0:0: [sde] Attached SCSI removable disk
Oct 15 17:27:34 DESKTOP gvfsd-metadata[1771]: g_udev_device_has_property: assertion 'G_UDEV_IS_DEVICE (device)' failed
在某一时刻,它说设备被删除然后重新连接(当然因为我现在已经这样做了很多次)并且它没有显示它再次断开连接。
GParted 不显示驱动器(因为我猜它们的大小无法确定)。 Windows 7 和 Windows 10 确实显示了它,diskmgmt.msc
但也没有可用的大小(它们都认为没有插入介质(就像读卡器一样,但它绝对不是)。Testdisk 不显示设备。手动安装设备也不是可能的原因...
尝试将整个设备归零dd
失败,因为:
marc@DESKTOP:~$ sudo dd if=/dev/zero of=/dev/sde count=32G
[sudo] Passwort für marc:
dd: konnte '/dev/sde' nicht öffnen: Kein Medium gefunden
marc@DESKTOP:~$
(请注意,驱动器应该有 32GB,因此计数参数实际上是有意义的)
利用底层 SCSI 设备的知识,我可以执行以下操作:
marc@DESKTOP:~$ sudo dd if=/dev/zero of=/dev/sg5 count=32G
dd: Schreiben in '/dev/sg5': Das numerische Argument ist außerhalb des Definitionsbereiches
2+0 Datensätze ein
1+0 Datensätze aus
512 Bytes kopiert, 0,000349558 s, 1,5 MB/s
marc@DESKTOP:~$
所以至少发生了一些事情,尽管计数参数超出了范围,我认为这非常令人恼火(我尝试过所有大于 1 的东西都超出了范围......)
输出dmesg
结束于
[ 1837.253976] usb-storage 1-3:1.0: USB Mass Storage device detected
[ 1837.254176] scsi host8: usb-storage 1-3:1.0
[ 1838.277632] scsi 8:0:0:0: Direct-Access General USB Flash Disk 1.0 PQ: 0 ANSI: 2
[ 1838.278571] sd 8:0:0:0: Attached scsi generic sg5 type 0
[ 1838.279953] sd 8:0:0:0: [sde] 7831552 512-byte logical blocks: (4.01 GB/3.73 GiB)
[ 1838.281670] sd 8:0:0:0: [sde] Write Protect is off
[ 1838.281675] sd 8:0:0:0: [sde] Mode Sense: 03 00 00 00
[ 1838.283098] sd 8:0:0:0: [sde] No Caching mode page found
[ 1838.283105] sd 8:0:0:0: [sde] Assuming drive cache: write through
[ 1838.288217] sde: sde1
[ 1838.292686] sd 8:0:0:0: [sde] Attached SCSI removable disk
[ 1889.632142] usb 1-3: USB disconnect, device number 7
[ 3055.640984] usb 1-3: new high-speed USB device number 8 using ehci-pci
[ 3055.797273] usb 1-3: New USB device found, idVendor=ffff, idProduct=1201, bcdDevice= 0.00
[ 3055.797278] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3055.797692] usb-storage 1-3:1.0: USB Mass Storage device detected
[ 3055.798138] scsi host8: usb-storage 1-3:1.0
[ 3056.813556] scsi 8:0:0:0: Direct-Access NAND USB2DISK 0.00 PQ: 0 ANSI: 4
[ 3056.814000] sd 8:0:0:0: Attached scsi generic sg5 type 0
[ 3056.816168] sd 8:0:0:0: [sde] Attached SCSI removable disk
[ 3250.754042] usb 1-3: USB disconnect, device number 8
[ 3297.441199] usb 1-3: new high-speed USB device number 9 using ehci-pci
[ 3297.597388] usb 1-3: New USB device found, idVendor=ffff, idProduct=1201, bcdDevice= 0.00
[ 3297.597393] usb 1-3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3297.597842] usb-storage 1-3:1.0: USB Mass Storage device detected
[ 3297.600635] scsi host8: usb-storage 1-3:1.0
[ 3298.622108] scsi 8:0:0:0: Direct-Access NAND USB2DISK 0.00 PQ: 0 ANSI: 4
[ 3298.622653] sd 8:0:0:0: Attached scsi generic sg5 type 0
[ 3298.625530] sd 8:0:0:0: [sde] Attached SCSI removable disk
marc@DESKTOP:~$
fsck 导致:
sudo fsck /dev/sde
fsck von util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
fsck.ext2: Kein Medium gefunden beim Versuch, /dev/sde zu öffnen
Der Superblock ist unlesbar bzw. beschreibt kein gültiges ext2/ext3/ext4-
Dateisystem. Wenn das Gerät gültig ist und ein ext2/ext3/ext4-
Dateisystem (kein swap oder ufs usw.) enthält, dann ist der Superblock
beschädigt, und Sie könnten versuchen, e2fsck mit einem anderen Superblock
zu starten:
e2fsck -b 8193 <Gerät>
oder
e2fsck -b 32768 <Gerät>
e2fsck 也做同样的事情......
总长DR我的办公桌上有大约 64GB 的 USB 存储设备,它们都因相同的原因而出现故障,并且由于相同的症状而无法使用。有任何想法吗?!提前致谢!
编辑1:我只是想我可能会使用 sg_dd 将整个事情归零,但没有:
marc@DESKTOP:~$ sudo sg_dd if=/dev/sg5 count=67108864
Assume default 'bs' (block size) of 512 bytes
Device (r) not ready
sg_read failed, at or after lba=0 [0x0]
Some error occurred, remaining block count=67108864
0+0 records in
0+0 records out
1 unrecovered error(s)
marc@DESKTOP:~$ sudo sg_dd if=/dev/sg5 count=67108864
Assume default 'bs' (block size) of 512 bytes
Device (r) not ready
sg_read failed, at or after lba=0 [0x0]
Some error occurred, remaining block count=67108864
0+0 records in
0+0 records out
1 unrecovered error(s)
marc@DESKTOP:~$ sudo sg_dd if=/dev/zero of=/dev/sg5 count=67108864
Assume default 'bs' (block size) of 512 bytes
device not ready (w)
sg_write failed, seek=0
Some error occurred, remaining block count=67108864
128+0 records in
0+0 records out
1 unrecovered error(s)
marc@DESKTOP:~$ sudo sg_dd if=/dev/zero of=/dev/sg5 bs=128 count=67108864
device not ready (w)
sg_write failed, seek=0
Some error occurred, remaining block count=67108864
128+0 records in
0+0 records out
1 unrecovered error(s)
marc@DESKTOP:~$
注意32G/512是指定的67108864个块(32*1024*1024*1024/512)