How long will mkfs -c take?

6,097

Solution 1

Sounds like it worked for you, but for ther record....

Block checking can take an incredibly long time if you have actual bad blocks that cause I/O errors; depending on the driver, the error and what it uses to recover. SSDs should be faster and presumably less likely to have errors, but errors could still make it many times the best-case scenario.

I'd suggest using dmesg to see if it is having problems if it seems overly slow.

BTW, why do you think it must write to the whole disk? I don't see from the mkfs.vfat(1) man page where it does a destructive test, the badblocks(1) program does a read-only test by default.

And FWIW, I've had mkfs -c take 24+ hours (IIRC) on a SCSI disk that was ~4GB.

Solution 2

I ran badblocks /dev/sdg1 on a 1TB HDD over USB 2.0, which is, according to the man page, what an mkfs.* -c command would do. The default test block size is 1KiB and it performs a read-only test by default.

After 24 hours I aborted it: it had only tested 120GB and found more than 10000 bad blocks. As @nvram pointed out, it can be very slow when you actually have bad blocks.

So for your HDD it might take more than 2 days.

Share:
6,097
ElPoney
Author by

ElPoney

Updated on September 17, 2022

Comments

  • ElPoney
    ElPoney over 1 year

    I'm currently running a

    sudo mkfs.msdos -c -F 32 /dev/sdg1
    

    How long would it take, approximately? This is an USB 2.0 disk of 250GB. The lower limit is of course 2 * 250GB / 480 Mbit/s ~ 8400s (it must write and read the whole disk) but I fear it could be slower than that.

    Does anybody have a first hand experience?

    Just to make this message more googlable, let me type fast and slow: how fast it will be? how slow?

  • Kazark
    Kazark over 11 years
    You're braver than me---when I start having bad blocks, I replace the disk.