[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How long will this take?

On Mon, Jun 08, 2020 at 10:01:13PM -0500, David Wright wrote:
On Mon 08 Jun 2020 at 20:22:39 (+0000), Matthew Campbell wrote:
I bought a new 4 terrabyte hard drive that is connected with a USB cable using USB2. It took about 32 hours to read every sector on the drive to look for bad sectors.

I recently ran

# badblocks -c 1024 -s -w -t random -v /dev/sdz

on a 2TB disk with a USB2 connection. The whole process, writing and
checking, took 33⅓ hours. (The disk now holds an encrypted ext4 filesystem.)

Yes, it's a slower process than just writing zeros. A modern drive will verify writes as they're made. badblocks is basically a relic of another age primarily intended to give a list of bad sectors to avoid when making a filesystem. Once upon a time, hard drives actually had a handwritten label on the top listing any bad sectors identified at the factory so you could avoid them. They don't have that anymore. If any modern hard drive has consistent bad (not remappable) sectors it should just be thrown away, because that means it is so far gone that it no longer has the ability to internally map bad sectors to reserved good sectors.

I started blanking the sectors using /dev/zero last Friday night. It still isn't done. Is there a way I can find out how much data a particular process has written to the disk? I'm using Debian 10.4.

I'm not sure why you'd do that. I've only zeroed disks to erase them
before I return them to the owner. (They're inside loaned computers.)

Because it accomplishes what your badblocks run does, in less than half the time. :)

Reply to: