:: Re: [DNG] Can this drive be saved?
Página Principal
Delete this message
Reply to this message
Autor: Gregory Nowak
Data:  
Para: golinux
CC: Dng
Assunto: Re: [DNG] Can this drive be saved?
On Sat, Aug 29, 2020 at 04:35:01PM -0500, golinux@??? wrote:
> What are the chances of fsck repairing the bad sectors? I shamefully admit I
> have not thought about fsck for years.


This looks to be at the media level, so is most likely beyond
fsck. Since you said you can afford to lose this drive's contents, I
would suggest using dd to fill the drive with zeros:

dd if=/dev/zero of=/dev/sdx

where /dev/sdx is the designation for your drive. This might cause the
drive to reallocate the bad sector, or to mark the bad sector as good
again. Then, run a SMART test on the drive again. If it still fails,
then that drive probably can't be fixed. If the SMART test passes this
time, you can restore your backups on to it and keep using it. If you
do that, be very sure to sync that drive with your other backups
frequently, and don't rely on it exclusively.

If you don't want to wait for dd to write the entire drive, you can try
following this tutorial instead:

<https://www.smartmontools.org/wiki/BadBlockHowto>

It seems to be old, but most if not all of it still seems relevant as
well. You will almost certainly want to run

e2fsck -f /dev/sdx1

at the end of this process before mounting the drive. Good luck.

Greg


--
web site: http://www.gregn.net
gpg public key: http://www.gregn.net/pubkey.asc
skype: gregn1
(authorization required, add me to your contacts list first)
If we haven't been in touch before, e-mail me before adding me to your contacts.

--
Free domains: http://www.eu.org/ or mail dns-manager@???