背景
去年,当我使用 Windows 文件资源管理器中的 Ctrl-C 和 Ctrl-V 将超过 600MB 的大型视频文件从桌面复制到我的 USB 记忆棒时,我忘记了我的 USB 记忆棒只有 4GB 存储空间。从那时起,它就被损坏了。
我尝试将其插入桌面。它安装了几秒钟,然后就卸下了。如此重复几次,然后不能被打开。
问题
今晚,我尝试/dev/sdg1
用fsck
.我从那里学到了这个命令问题溢出。它是不是运行以下命令时安装。
# dosfsck -w -r -l -a -v -t /dev/sdg1 > err4.txt
# cat err4.txt
fsck.fat 3.0.26 (2014-03-07)
fsck.fat 3.0.26 (2014-03-07)
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "MSDOS5.0"
Media byte 0xf8 (hard disk)
512 bytes per logical sector
4096 bytes per cluster
960 reserved sectors
First FAT starts at byte 491520 (sector 960)
2 FATs, 32 bit entries
3948544 bytes per FAT (= 7712 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 8388608 (sector 16384)
987038 data clusters (4042907648 bytes)
63 sectors/track, 255 heads
62 hidden sectors
7912688 sectors total
Checking file /
Checking file /Personal Data (PERSON~1)
Checking file /LATEX
Checking file /JFSW2.EXE
...
Checking file /Personal Data/Pc-Lock pictures/PF830.JPG
Checking file /Personal Data/Pc-Lock pictures/SD.JPG
Checking file /Personal Data/Pc-Lock pictures/SSD.JPG
Checking file /Personal Data/Pc-Lock pictures/StoreJet.jpg (STOREJET.JPG)
Checking file /Personal Data/My Folders/.
Checking file /Personal Data/My Folders/..
Checking file /Personal Data/My Folders/Pictures.zip (PICTURES.ZIP)
/Personal Data/My Folders/Pictures.zip
Cluster 188 (133912) is unreadable. Skipping it.
/Personal Data/My Folders/Pictures.zip
Cluster 188 (133913) is unreadable. Skipping it.
/Personal Data/My Folders/Pictures.zip
Cluster 188 (133914) is unreadable. Skipping it.
/Personal Data/My Folders/Pictures.zip
Cluster 188 (133915) is unreadable. Skipping it.
...
/Personal Data/My Folders/Pictures.zip
Cluster 188 (135168) is unreadable. Skipping it.
然后我观察到它/dev/sdg1
变成了/dev/sdh1
,但是我没有完全触摸 USB 记忆棒。
以下是有关我的桌面和 USB 记忆棒的文件系统类型的信息。 /dev/sda3
和分别/dev/sda5
是C
和D
驱动器。 /dev/sda6-8
适用于 Ubuntu。
# blkid
/dev/sda1: UUID="2CD3-8FE2" TYPE="vfat"
/dev/sda2: LABEL="RECOVERY" UUID="581C73CC1C73A422" TYPE="ntfs"
/dev/sda3: LABEL="OS" UUID="432124AD08015DA8" TYPE="ntfs"
/dev/sda5: UUID="76EA5D8F396390CF" TYPE="ntfs"
/dev/sda6: UUID="710414a3-c379-4c9f-b4cd-8781c6612e41" TYPE="ext4"
/dev/sda7: UUID="13d1958a-e6ac-4b73-b597-2ef17f92dade" TYPE="ext4"
/dev/sda8: UUID="1338c1b0-7265-440a-ad76-a400cddc0a32" TYPE="swap"
/dev/sda9: UUID="58c3ff6b-f241-4c41-964f-022388db1755" TYPE="ext4"
/dev/sda10: UUID="H8XCbA-MEf2-9SSd-bffN-sXyJ-Mvcj-SwCnlG" TYPE="LVM2_member"
/dev/mapper/vg_014199203162-lv_swap: UUID="cda4c7ab-0b84-4c12-8f55-9823c12c8950" TYPE="swap"
/dev/mapper/vg_014199203162-f17root: LABEL="_Fedora-17-i686-" UUID="338fb7fe-261f-4a7f-ac57-fd16b4e21792" TYPE="ext4"
/dev/mapper/vg_014199203162-home: UUID="b19cf480-f882-4093-9683-edc9b2365931" TYPE="ext4"
/dev/sdg1: UUID="08F1-B181" TYPE="vfat"
去年,我通过tty1
使用获得了这些输出screendump
。我观察到这些块16384-16391
重复出现。
$ ls /media/owner/08F1-B181/
[ 2543.126034] FAT-fs (sdf1): Directory bread(block 16384) failed
[ 2543.127680] FAT-fs (sdf1): Directory bread(block 16385) failed
[ 2543.129345] FAT-fs (sdf1): Directory bread(block 16386) failed
[ 2543.131001] FAT-fs (sdf1): Directory bread(block 16387) failed
[ 2543.132664] FAT-fs (sdf1): Directory bread(block 16388) failed
[ 2543.133720] FAT-fs (sdf1): Directory bread(block 16389) failed
[ 2543.134689] FAT-fs (sdf1): Directory bread(block 16390) failed
[ 2543.135658] FAT-fs (sdf1): Directory bread(block 16391) failed
$ sudo screendump > err1.txt
[ 2492.101487] FAT-fs (sdf1): Directory bread(block 16385) failed
[ 2492.103723] FAT-fs (sdf1): Directory bread(block 16386) failed
[ 2492.105919] FAT-fs (sdf1): Directory bread(block 16387) failed
[ 2492.108077] FAT-fs (sdf1): Directory bread(block 16388) failed
[ 2492.109698] FAT-fs (sdf1): Directory bread(block 16389) failed
[ 2492.111242] FAT-fs (sdf1): Directory bread(block 16390) failed
[ 2492.112755] FAT-fs (sdf1): Directory bread(block 16391) failed
$ sudo screendump > err1.txt
[ 2505.637759] FAT-fs (sdf1): Directory bread(block 16384) failed
[ 2505.640392] FAT-fs (sdf1): Directory bread(block 16385) failed
[ 2505.642960] FAT-fs (sdf1): Directory bread(block 16386) failed
[ 2505.645479] FAT-fs (sdf1): Directory bread(block 16387) failed
[ 2505.646969] FAT-fs (sdf1): Directory bread(block 16388) failed
[ 2505.648361] FAT-fs (sdf1): Directory bread(block 16389) failed
[ 2505.649739] FAT-fs (sdf1): Directory bread(block 16390) failed
[ 2505.651098] FAT-fs (sdf1): Directory bread(block 16391) failed
[ 2505.652455] FAT-fs (sdf1): Directory bread(block 16384) failed
[ 2505.653776] FAT-fs (sdf1): Directory bread(block 16385) failed
[ 2505.655073] FAT-fs (sdf1): FAT read failed (blocknr 1264)
-bash: err1.txt: Input/output error
$ ls
[ 2514.902553] FAT-fs (sdf1): Directory bread(block 16384) failed
[ 2514.904685] FAT-fs (sdf1): Directory bread(block 16385) failed
[ 2514.906765] FAT-fs (sdf1): Directory bread(block 16386) failed
[ 2514.908830] FAT-fs (sdf1): Directory bread(block 16387) failed
[ 2514.910083] FAT-fs (sdf1): Directory bread(block 16388) failed
[ 2514.911230] FAT-fs (sdf1): Directory bread(block 16389) failed
[ 2514.912373] FAT-fs (sdf1): Directory bread(block 16390) failed
[ 2514.913501] FAT-fs (sdf1): Directory bread(block 16391) failed
$ cd GE[ 2520.571564] FAT-fs (sdf1): Directory bread(block 16384) failed
[ 2520.573560] FAT-fs (sdf1): Directory bread(block 16385) failed
[ 2520.575570] FAT-fs (sdf1): Directory bread(block 16386) failed
[ 2520.577540] FAT-fs (sdf1): Directory bread(block 16387) failed
[ 2520.579464] FAT-fs (sdf1): Directory bread(block 16388) failed
[ 2520.581348] FAT-fs (sdf1): Directory bread(block 16389) failed
[ 2520.583180] FAT-fs (sdf1): Directory bread(block 16390) failed
[ 2520.585002] FAT-fs (sdf1): Directory bread(block 16391) failed
[ 2520.586242] FAT-fs (sdf1): Directory bread(block 16384) failed
[ 2520.587227] FAT-fs (sdf1): Directory bread(block 16385) failed
cd ..
-bash: cd: GEcd: No such file or directory
$ cd ..
$ cd
$ ls /m[ 2535.708028] FAT-fs (sdf1): bread failed in fat_clusters_flush
$ ls /media/owner/08F1-B181/
[ 2543.126034] FAT-fs (sdf1): Directory bread(block 16384) failed
[ 2543.127680] FAT-fs (sdf1): Directory bread(block 16385) failed
[ 2543.129345] FAT-fs (sdf1): Directory bread(block 16386) failed
[ 2543.131001] FAT-fs (sdf1): Directory bread(block 16387) failed
[ 2543.132664] FAT-fs (sdf1): Directory bread(block 16388) failed
[ 2543.133720] FAT-fs (sdf1): Directory bread(block 16389) failed
[ 2543.134689] FAT-fs (sdf1): Directory bread(block 16390) failed
[ 2543.135658] FAT-fs (sdf1): Directory bread(block 16391) failed
$ sudo screendump > err1.txt
$ sudo ./custom_umount.sh
[ 2562.338570] FAT-fs (sdf1): unable to read boot sector to mark fs as dirty
如何检索 USB 记忆棒中的数据?有什么办法可以格式化这个 U 盘吗?
为了回答贾尔斯的问题,我发布了 的输出/var/log/kern.log
。今天早上检测到我的 USB /dev/sdf1
。
Apr 10 09:48:57 owner-Inspiron-560s kernel: [ 664.264018] usb 2-1: new high-speed USB device number 3 using ehci-pci
Apr 10 09:48:58 owner-Inspiron-560s kernel: [ 664.450207] usb 2-1: New USB device found, idVendor=8564, idProduct=1000
Apr 10 09:48:58 owner-Inspiron-560s kernel: [ 664.450212] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 10 09:48:58 owner-Inspiron-560s kernel: [ 664.450216] usb 2-1: Product: Mass Storage Device
Apr 10 09:48:58 owner-Inspiron-560s kernel: [ 664.450220] usb 2-1: Manufacturer: JetFlash
Apr 10 09:48:58 owner-Inspiron-560s kernel: [ 664.450223] usb 2-1: SerialNumber: 49FBA7ASLQLI85XB
Apr 10 09:48:58 owner-Inspiron-560s kernel: [ 664.450505] usb-storage 2-1:1.0: USB Mass Storage device detected
Apr 10 09:48:58 owner-Inspiron-560s kernel: [ 664.452264] scsi3 : usb-storage 2-1:1.0
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.625373] scsi 3:0:0:0: Direct-Access JetFlash Transcend 4GB 1100 PQ: 0 ANSI: 0 CCS
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.625637] sd 3:0:0:0: Attached scsi generic sg6 type 0
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.626204] sd 3:0:0:0: [sdf] 7913472 512-byte logical blocks: (4.05 GB/3.77 GiB)
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.626964] sd 3:0:0:0: [sdf] Write Protect is off
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.626967] sd 3:0:0:0: [sdf] Mode Sense: 43 00 00 00
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.629683] sd 3:0:0:0: [sdf] No Caching mode page found
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.629688] sd 3:0:0:0: [sdf] Assuming drive cache: write through
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.633958] sd 3:0:0:0: [sdf] No Caching mode page found
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.633963] sd 3:0:0:0: [sdf] Assuming drive cache: write through
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.635278] sdf: sdf1
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.638587] sd 3:0:0:0: [sdf] No Caching mode page found
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.638594] sd 3:0:0:0: [sdf] Assuming drive cache: write through
Apr 10 09:48:59 owner-Inspiron-560s kernel: [ 665.638599] sd 3:0:0:0: [sdf] Attached SCSI removable disk
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.577641] usb 2-1: USB disconnect, device number 3
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588035] sd 3:0:0:0: [sdf]
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588041] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588044] sd 3:0:0:0: [sdf] CDB:
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588046] Write(10): 2a 00 00 00 00 3e 00 00 01 00
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588059] end_request: I/O error, dev sdf, sector 62
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588064] Buffer I/O error on device sdf1, logical block 0
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588066] lost page write due to I/O error on sdf1
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588596] FAT-fs (sdf1): FAT read failed (blocknr 1042)
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.592660] FAT-fs (sdf1): Directory bread(block 16384) failed
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.592666] FAT-fs (sdf1): Directory bread(block 16385) failed
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.592668] FAT-fs (sdf1): Directory bread(block 16386) failed
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.592670] FAT-fs (sdf1): Directory bread(block 16387) failed
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.592672] FAT-fs (sdf1): Directory bread(block 16388) failed
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.592674] FAT-fs (sdf1): Directory bread(block 16389) failed
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.592676] FAT-fs (sdf1): Directory bread(block 16390) failed
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.592678] FAT-fs (sdf1): Directory bread(block 16391) failed
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.592841] FAT-fs (sdf1): Directory bread(block 16384) failed
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.592843] FAT-fs (sdf1): Directory bread(block 16385) failed
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.726597] FAT-fs (sdf1): FAT read failed (blocknr 960)
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.928055] usb 2-1: new high-speed USB device number 4 using ehci-pci
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 671.114205] usb 2-1: New USB device found, idVendor=8564, idProduct=1000
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 671.114209] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 671.114211] usb 2-1: Product: Mass Storage Device
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 671.114213] usb 2-1: Manufacturer: JetFlash
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 671.114215] usb 2-1: SerialNumber: 49FBA7ASLQLI85XB
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 671.114482] usb-storage 2-1:1.0: USB Mass Storage device detected
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 671.114531] scsi4 : usb-storage 2-1:1.0
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 671.165582] FAT-fs (sdf1): unable to read boot sector to mark fs as dirty
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.285361] scsi 4:0:0:0: Direct-Access JetFlash Transcend 4GB 1100 PQ: 0 ANSI: 0 CCS
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.285607] sd 4:0:0:0: Attached scsi generic sg6 type 0
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.289169] sd 4:0:0:0: [sdf] 7913472 512-byte logical blocks: (4.05 GB/3.77 GiB)
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.290238] sd 4:0:0:0: [sdf] Write Protect is off
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.290242] sd 4:0:0:0: [sdf] Mode Sense: 43 00 00 00
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.291531] sd 4:0:0:0: [sdf] No Caching mode page found
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.291535] sd 4:0:0:0: [sdf] Assuming drive cache: write through
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.295714] sd 4:0:0:0: [sdf] No Caching mode page found
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.295718] sd 4:0:0:0: [sdf] Assuming drive cache: write through
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.297077] sdf: sdf1
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.300147] sd 4:0:0:0: [sdf] No Caching mode page found
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.300151] sd 4:0:0:0: [sdf] Assuming drive cache: write through
Apr 10 09:49:05 owner-Inspiron-560s kernel: [ 672.300154] sd 4:0:0:0: [sdf] Attached SCSI removable disk
答案1
从内核日志:
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588044] sd 3:0:0:0: [sdf] CDB:
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588046] Write(10): 2a 00 00 00 00 3e 00 00 01 00
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588059] end_request: I/O error, dev sdf, sector 62
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588064] Buffer I/O error on device sdf1, logical block 0
Apr 10 09:49:04 owner-Inspiron-560s kernel: [ 670.588066] lost page write due to I/O error on sdf1
这不太好:这是一个硬件错误,级别低于文件系统。fsck
有助于解决软件级错误,但无法修复硬件;运行它甚至可能会让事情变得更糟,因为它试图移动数据,但不能,因为某些空间无法写入。
U 盘往往价格便宜且不可靠。您的一些数据可能会丢失。尝试解救将大部分文件系统恢复到磁盘映像中,但不可读的扇区可能会永远丢失。我不会尝试将新数据存储在经过验证的坏棍子上。