Changes between Version 4 and Version 5 of BadBlockHowto


Ignore:
Timestamp:
Mar 25, 2017, 2:07:38 PM (8 years ago)
Author:
Gabriele Pohl
Comment:

Unassigned sectors

Legend:

Unmodified
Added
Removed
Modified
  • BadBlockHowto

    v4 v5  
    355355}}}
    356356
     357=== Unassigned sectors ===
     358
     359This section was written by Kay Diederichs. Even though this section assumes Linux and the ext2/ext3 file system, the strategy should be more generally applicable.
     360
     361I read your badblocks-howto at and greatly benefited from it. One thing that's (maybe) missing is that often the `smartctl -t long` scan finds a bad sector which is not assigned to any file. In that case it does not help to run `debugfs`, or rather `debugfs` reports the fact that no file owns that sector. Furthermore, it is somewhat laborious to come up with the correct numbers for `debugfs`, and `debugfs` is slow ...
     362
     363So what I suggest in the case of presence of `Current_Pending_Sector/Offline_Uncorrectable` errors is to create a huge file on that file system.
     364
     365{{{
     366  dd if=/dev/zero of=/some/mount/point bs=4k
     367}}}
     368
     369creates the file. Leave it running until the partition/file system is full. This will make the disk reallocate those sectors which do not belong to a file. Check the `smartctl -a` output after that and make sure that the sectors are reallocated. If any remain, use the debugfs method. Of course the usual caveats apply - back it up first, and so on.
     370
    357371== Footnotes ==
    358372