[NTLUG:Discuss] Repairing?? bad disk sectors in Linux?
Alvin Goats
agoats at compuserve.com
Sun Apr 26 17:10:33 CDT 2009
badblocks is the actual program that checks for bad blocks on the drive.
It is prefered to use something else that uses badblocks in order to
match block sizes. If you're running an ext2 or ext3 filesystem, e2fsck
-c /dev/disk is the command to use where disk is the partition to
check. The -c tells e2fsck to do a bad block check and fix it, typically
moving the data elsewhere and marking the block as bad.
If you find what the block size is for your partiton or drive, you can
run badblocks directly and let it create a badblock file that can be
used by the filesystem to map out the bad blocks.
reiserfsck, jfs_fsck and similar should be looked at for bad block
identification and recovery.
Alvin
John K. Taber wrote:
>
> I'm not sure of terminology, so bear with me.
>
> I'm running a dual boot system, with Windows XP SP3 on the first drive,
> which I recently had replaced. And I'm running FC 6 on a second drive.
>
> Before replacing, I used Seatools to check both drives. The Windows drive
> had to be replaced. The FC 6 drive also had an error, but not fatal.
>
> The FC 6 drive fails the short disk test, which I gather means a bad sector
> (I could be wrong).
>
> Now, how do we handle disk errors (not file errors, disk errors) in Linux?
> Is there a Linux command, or a utility that will find the bad sector, and
> remove it from use? In other words, something similar to Windows disk tools.
>
> Or is finding and bypassing bad disk spots something done under the covers
> in the Linux world.
>
> And how about defragmenting? In a real operating system, defragmenting is
> done by the OS in spare moments. Does Linux work like that? I would assume
> so, but I don't know.
>
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
>
>
More information about the Discuss
mailing list