AltraMayor / f3

F3 - Fight Flash Fraud
https://fight-flash-fraud.readthedocs.io/en/stable/
GNU General Public License v3.0
2.52k stars 141 forks source link

Show progress of f3probe #196

Open amreo opened 1 year ago

amreo commented 1 year ago

Hi! I'm running f3probe on a advertised 1024 GB sd card. And it's taking too much time (>2d) I don't know if it is hung (but the led of the usb-sdcard adapter is blink) or is in progress. The issue is that doesn't show the progress

AltraMayor commented 1 year ago

HI @amreo,

While it's not clear how to make f3probe report progress since it's not doing a well-delimited task, it should finish before one day, and it mostly finishes in under 15 minutes. So you likely have some problem going on. Before pointing the finger at the testing drive, you're better off canceling f3probe and running f3write and f3read to assess the drive.

The problem with reporting progress in f3probe is that its behavior resembles playing a strategic game like chess against a possibly fake drive. Some extra reporting can be made, and I'll eventually add that.

amreo commented 1 year ago

With f3read I need 70h to complete the scan. I know because I already have tried it and stopped after two hours because I didn't want to wait. How can I fix the microsd without using f3probe?

When I ran f3read I got this result:

F3 read 8.0
Copyright (C) 2010 Digirati Internet LTDA.
This is free software; see the source for copying conditions.

                  SECTORS      ok/corrupted/changed/overwritten
Validating file 1.h2w ...       0/  2097152/      0/      0
Validating file 2.h2w ...       0/  2097152/      0/      0
Validating file 3.h2w ...       0/  2097152/      0/      0
Validating file 4.h2w ... 0.59% -- 2.20 MB/s -- 69:47:57^C
AltraMayor commented 1 year ago

If you don't want to wait for 70h, test only 30% of the drive using option --end-at=307 of f3write.

Once you have the report of f3read, you can try to guess the parameter --last-sec=SEC-NUM of f3fix to fix the drive.

sndcrde commented 1 year ago

While it's not clear how to make f3probe report progress since it's not doing a well-delimited task,

Surely there is some plan of what f3probe is going to do when testing a new SD card? Perhaps f3probe has to test a certain number of sectors based on the size of the card, right? Then f3probe should give a status report after every 1/10/100/1000/whatever tested sectors. Maybe there should be an option to specify how often the progress report should be printed.

Another option to implement this is to make the progress feedback time dependent. For example, every minute f3probe should print its progress feedback message as to what it's currently doing and how long it's going to take for it to finish testing the card.

Regards,