dosfsck: how long does it take to repair a 32GB FAT filesystem on a USB drive?

0

I have a 32 GB USB stick with totally corrupted filesystem and a laptop with Ubuntu.

I have run the command dosfsck -w -r -l -a -v -t /dev/sdb1 16 days ago and it is still running. It has been using 100% of one cpu all this time.

In stdout I currently see messages like this:

/резюме Enter engineer/Length 8.66>/+φεïτnv.S¥d
  Bad short file name (+φεïτnv.S¥d).
  Auto-renaming it.
  Renamed to FSCK0071.483

which means that it has "repared" 71.5k files? One "auto-renaming" operation takes about 1 minute.

How do you think, is everything OK? Will the process finish successfully? What remaining time estimate could you make?

I am also not 100% sure if the original filesystem was FAT, because the person who gave it to me doesn't even know what a filesystem is. Can you tell in the current situation that it really wasn't FAT and what dosfsck is doing is corrupting it even more?

Finally, what would you suggest the best thing to do in this situation?

K. Matveev

Posted 2019-09-07T13:46:54.653

Reputation: 1

What’s your goal? Recovering the data? In that case, you should’ve taking a backup image first. It’s too late now, of course. – Daniel B – 2019-09-07T15:53:48.940

Answers

0

Stop using FAT on USB stick drives, especially if you plug/unplug it often not jsut from your PC but with external devices like TVs or TV adapters, that constantly write on it for live recording (turn that device off before unplugging the stick, this will avoid FAT corruptions).

Generally, it's much safer to use NTFS which is autoreparable (thanks to its transaction log), and most devices recognize the NTFS format, not just FAT32.

If your stick is highly damaged, it's probably better to reformat it and stop trying repairing it as the content will be almost unusable. So stop the process (unplug the USB stick, replug it, erase all its partitions, and reformat it with NTFS... and learn to unplug the USB drive properly when it's not actively recording anything: you can plug in the drive on an active device, but to unplug the USB drive, prefer turning the device off before to stop that activity, if you don't find the option in the device menu to "eject" the drive safely).

In your TV or external TV adapter, look at options that have enabled its use for live recording: disable that option which may be ON by default ! For live recording, use a dedicated drive that you will not frequently plug in/out.

The FAT-based filesystems (FAT16, FAT32, exFAT) are very sensitive to volume corruption, especially on USB sticks that don't have any internal power source to terminate pending writes safely: you must first inform the device to stop using it and terminate all pending operations and the simplest way is to turn off the device normally (don't remove its power cord abruptly, use your remote control to shutdown, wait a few seconds, remove the USB stick, then you can turn on again the device).

verdy_p

Posted 2019-09-07T13:46:54.653

Reputation: 266