You are not logged in.
Hi, all!
I couldn't see a more appropriate place to post this, as it didn't seem right to put it in 'Kernel/ Hardware'. My apologies if it is in the wrong place.
I have a second hard disk drive in my PC and when I use it, it occasionally gives 'bad sector' errors. The hard drive is not currently used, but until I buy a replacement, I was wondering whether it is possible to do a 'deep' format of the disk, which would mark bad sectors. These sectors could then be ignored by future installations.
Is this possible?
Would I have to do it as part of normal partitioning, ie, when setting-up ext4 partitions, etc?
I'd prefer to mark the sectors at a deeper evel, so I don't have to think about it when I do future installs on that disk.
Any help/ advice appreciated.
Chris.
Last edited by chris_debian (2011-02-06 16:15:56)
Offline
Offline
I think you can use "hdparm -D" to do that (see man hdparm) but I have never actually tried it to see how it works.
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
Thanks,guys; I'lllookinto both. I must admit, I've not heard of the 'badblocks' application.
Cheers,
Chris.
Offline
If the disk you are planning to use already has bad sectors visible to the user then you better get rid of it. Modern hard disks automatically reallocate bad sectors when they are found, if too many bad sectors have been found and there are no more spare sectors to reallocate the bad ones then it's way past time to replace the disk.
That said, you can always tell mkfs.whatever to search for and avoid damaged sectors (mkfs.whatever will call badblocks to search for and report the damaged sectors). You will be gambling with your data though, because it is quite probable that more bad sectors will develop over time.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Good point, maybe I should just look to getting a new one.
I'll mark this as solved.
Chris.
Offline
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Offline