How long does badblocks take on a 1TB drive?
I'm running badblocks (or rather "e2fsck -c") on a 1TB drive and if the progress indicator is any indication (no pun intended), it's going to take almost forever to complete.
Right now it says 0.01% done, 30:20 elapsed
which would mean the thing would take 17 weeks or so to complete, which seems rather excessive in my book.
Is that a normal amount of time for such a check to take or it simply that my suspicions are correct in that the drive is failing, thus causing the check to take only slightly shorter than eternity?
I found this question here, but that pertains to the amount of passes done.
To answer you question, the closest I can offer is with a 3TB I tested for this. Here are the 3 times tests I did, only changing the parameter values for -c
and only doing them up to 10% since they took A LOT of time. Each was done 3 times to get an average.
Note that "n" is a -n
option that does non-destructive write test. You can remove it to do a read-only test. Also -s
is for better progress info and -v
stands for verbose.
badblocks -svn /dev/sdb
To get to 1%: 1 Hour
To get to 10%: 8 hours 40 minutes
badblocks -svn -b 512 -c 32768 /dev/sda
To get to 1%: 35 Minutes
To get to 10%: 4 hours 10 minutes
badblocks -svn -b 512 -c 65536 /dev/sda
To get to 1%: 16 Minutes
To get to 10%: 2 hours 35 minutes
So yes, the -c
parameter has a very big influence on the time it takes to check the drive. I would guess that for a 1 TB Hard drive, assuming it maintains the same time frame as the 3TB, it would be 1/3 of the time mentioned here, so to get to 10% with -c 65536
on the 1 TB HDD it would be about 50 minutes.
Badblocks makes 4 runs. On a 1 TB external HD it usually takes around 70 hours.
Try increasing amount of blocks processed together, like in badblocks -svn -b 512 -c 65536 /dev/sda
. In this way, I can get a 1 TB hard disk drive checked in 8 hours.
I'm running badblocks on WD Red 4TB drives. Since they're 4k sector drives (checked using lsblk -o NAME,PHY-SeC
) I'm running it with -b 4096
. I wanted to give each of the badblocks instances ~800Mb of RAM so I used -c 200000
which gives you 4096 bytes * 200,000 blocks = 800,000 Kb
. They started out with abour 800Mb each but that crept up over time. These settings do provide a significant speedup over standard settings though.
It ran 1% in 3min 56sec but that's 1% of 4 patterns. It also seems to take more time the closer you get to the end of a run. It checked the disk with the first pattern in about 17hrs so it should complete 4TB in about 68hr.
COMMAND BELOW RUNS A DESTRUCTIVE WRITE
Command I'm using is:
badblocks -svw -b 4096 -c 200000 /dev/sdc -o bb_sdc.txt