Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Sep 2022 20:09:23 -0600
From:      Gary Aitken <freebsd@dreamchaser.org>
To:        questions@freebsd.org
Subject:   Re: disk non-destructive bad-block write/fix?
Message-ID:  <50ee834e-60ef-badb-68ce-f9aa589cd3cc@dreamchaser.org>
In-Reply-To: <4e864eaefcb7dbed7bdf59d40920a0ab9b964bf5.camel@riseup.net>
References:  <d687eb29-a3fb-7d91-a2c6-c1e4e1dc7e31@dreamchaser.org> <1f639118-4bb2-acfd-ab8e-e3aab9a79c9e@holgerdanske.com> <4e864eaefcb7dbed7bdf59d40920a0ab9b964bf5.camel@riseup.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Thanks all for your insights.

Unplugging / unmounting / reseating cables did not improve things.
Nor did a different cable.
I eventually got a complete backup, but I will be migrating off that disk.
I already am rotating backup media, so that one will rotate out.

On 9/19/22 11:45 PM, grarpamp wrote:
> Store a sha256 of all the files, read them back to verify and compare
> to that.

Can you post a script that does this?  (Save me (and others?) some effort).
If you already do this, what is the sequence?
   1. generate list of all files to be backed up, e.g.
        find /home/me/ | grep -iv -f /home/me/backup_ignores.txt >files.txt
   2. perform the sums individually and then sum the sums.
      This one is harder because of blanks and other stupid characters in
      some file names.
        cat files.txt | xargs -L 1 sha256 -r >file-sums.txt (doesn't work)
   3. read back and compare
        ...
Or do you do the whole thing on the fly somehow and only worry about the
one overarching result?

> dd if=/dev/da0 of=/dev/null bs=1m conv=noerror
Am I right in assuming this will skip remapped bad sectors?
It's been running for several days now...

On 9/20/22 7:33 AM, Christoph Brinkhaus wrote:
> A different countermeasure could be to use an external power supply 
> if possible. I have a USB disk with does not work with the USB +5V 
> supply but performs well with an external +5V wall type supply.

Ouch, I wasn't aware of that as an issue.  How do you get both the USB
connection to the computer and the connection to the external power
supply?  Use a USB splitter cable?

On 9/20/22 2:02 PM, jin guojun wrote:
> It also could be the USB controller. I have an older USB drive that 
> works with many computers, but failed on a newer one. The newer 
> computer usually has issues on its USB3 port, but later has issues on
> USB2 as well. The USB enclosure has an additional USB cable for 
> getting power from the second USB port. Plugging in the second USB 
> cable worked for some time, and the USB randomly spits out the above
>  errors. The problem seems related to boot up. When this newer 
> computer has USB issues, it will always have the issue till reboot.

Thanks, I will try another port although as nearly as I can tell my
mobo (ASUS M4A89GTD Pro/USB3) only has one controller.

On 9/20/22 1:00 PM, David Christensen wrote:
> Zero-fill, test, and/or repair the old disk using the manufacturer 
> diagnostic.  For example, Seagate:
> 
> https://www.seagate.com/support/downloads/seatools/

Thanks, I will try that once it's rotated out of use.

> USB HDD's are a problem.  I usually end up extracting the HDD and
> recycling the rest.  I can then test the drive and have confidence in
> the result.

Hmmm.  I've never taken one of these apart with the intent of anything
other than extracting the motor for use in a solar bot.  Is there
usually easy access to the SATA pins to plug in a controller? and similar
for power?

Gary



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50ee834e-60ef-badb-68ce-f9aa589cd3cc>