badsect(8) is gone -- what now?

Robert Banz rob at nofocus.org
Mon Jul 30 06:44:06 UTC 2018


And if you’re just trying to recover your data from said disk, try out
‘ddrescue’ and dump the partition to a file or another disk.

On Mon, Jul 30, 2018 at 2:38 AM Peter Jeremy <peter at rulingia.com> wrote:

> On 2018-Jul-27 15:07:43 +0200, Robert Clausecker <fuz at fuz.su> wrote:
> >Is there any way the kernel interface for badsect(8) or a utilitiy
> >fulfilling a similar purpose is going to come back?  I understand that
> >kernel support was removed due to possible misuse of mknod(S_IFMT)
> >leading to crashes [1], but there really ought to be some way to mark a
> >sector as bad if the disk doesn't want to do it for you.
>
> All modern disks do bad sector mapping in the drive firmware.  In general,
> if you disk reaches a point where it can't remap a visibly bad sector then
> the drive's internal set of spare blocks is exhausted and the disk is about
> to fail completely.  The recommended solution is to replace the disk.  Have
> you looked at the disk's SMART stats (using eg
> ports/sysutils/smartmontools)?
>
> One approach I've used in the past is to create a file covering the bad
> sector(s), mark it immutable and stash it somewhere where you don't attempt
> to read it.
>
> --
> Peter Jeremy
>


More information about the freebsd-fs mailing list