2

I have a 500Gb Internal HDD and from dmesg's output i got this "wonderful" news:

[  324.434832] end_request: I/O error, dev sde, sector 4715026720
[  324.434838] Buffer I/O error on device sde1, logical block 589378084
[  324.434854] Buffer I/O error on device sde1, logical block 589378085
[  324.434858] Buffer I/O error on device sde1, logical block 589378086
[  324.434862] Buffer I/O error on device sde1, logical block 589378087
[  324.434866] Buffer I/O error on device sde1, logical block 589378088
[  324.434870] Buffer I/O error on device sde1, logical block 589378089
[  324.434873] Buffer I/O error on device sde1, logical block 589378090
[  324.434877] Buffer I/O error on device sde1, logical block 589378091
[  324.434881] Buffer I/O error on device sde1, logical block 589378092
[  324.434884] Buffer I/O error on device sde1, logical block 589378093

I was wondering if there is any way to "eliminate" this area from the hard drive (like covering it, or blocking access to it) and reformat it so when I use the renaming part of the drive it will write only on the good sectors.

I use this drive only for storage, even if in the future fails completely is ok.

simple mind
  • 349
  • 5
  • 16

1 Answers1

1

The command you need is called badblocks.

To check:

sudo badblocks -v /dev/sde1
  • This is just to view them and is harmless to execute.

Use sudo dumpe2fs to find out the blocksize. Probably "4096"

And to mark them:

sudo badblocks -c 4096 /dev/sde1 > /home/$USER/badblocks.txt
sudo fsck -l /home/$USER/badblocks.txt /dev/sde1
  • 1st command creates a text file with the bablocks. Harmless. Change the "4096" to what you found.
  • 2nd command uses "fsck" to mark the blocks.
Rinzwind
  • 293,910
  • 41
  • 570
  • 710