[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Signs of hard drive failure?

On Sunday 20 October 2019 22:21:20 Ken Heard wrote:

> In the past week or so some in my computer procedures have become
> sluggish, and some others have not worked at all.
> For example the following script works:
> #! /bin/bash
> cd /home/ken
> tar -czf /media/fde/backups/kfinancescurrent.tgz --wildcards\
> --exclude-from=docs/tarlists/kfinancesarchive.lst
> docs/01-kens/Finances cd $CURPWD
> Whereas this one does not work now but did two weeks ago:
> #!/bin/bash
> # Shell script to create a tgz file for the contents of the
> # /home/ken/docs and the /usr/local/ directories,
> # minus the files in file /home/ken/docs/tarlists/kexcludedocs.lst
> # This script may be run from any directory to which the user has
> write # permission.
> # Start by creating a variable with the current directory.
> # Change directory to /
> cd /
> # Create the tarball.
> tar -czpf media/fde/backups/kdocsfull.tgz  -X
> /home/ken/docs/tarlists/kdocsfullexclude.lst -T
> /home/ken/docs/tarlists/kdocsfullinclude.lst
> # Return to the starting directory.
> cd $CURPWD
two things. 1. CURPWD isn't the greatest choice for that varname as its 
an ENV var in many systems, and could be overwritten by your cd's.
2. your missing a slash in front of media, it probably s/b /media/ etc

Querying your drives with smartctl can be missleading, I have one of the 
very first seagate 1TB drives that has 25 reallocated sectors and has 
had them since the first such check, well over 100,000 power up hours 
ago. Its firmware was updated (and its write speed improved by about 25 
megs a second) when I first discovered that. I would not hesitate to 
recycle it for a new install, its an old friend by now.
> Now when I try to run it it returns the following:
> ken@SOL:~$ tar -czpf media/fde/backups/kdocsfull.tgz  -X
> /home/ken/docs/tarlists/kdocsfullexclude.lst -T
> /home/ken/docs/tarlists/kdocsfullinclude.lst
> tar (child): media/fde/backups/kdocsfull.tgz: Cannot open: No such
> file or directorytar: home/ken/docs: Cannot stat: No such file or
> directory
> tar: usr/local: Cannot stat: No such file or directory
> tar (child): Error is not recoverable: exiting now
> tar: Child returned status 2
> tar: Error is not recoverable: exiting now
> All the files/directories which this script cannot stat do in fact
> exist, proven by the fact that the first script uses the same
> directories, but different files in those directories.
> As these symptoms can indicate I think hard drive failure or potential
> failure I am trying to explore this possibility.
> I am using Stretch and TDE with two 2 TB Seagate Barracuda hard drives
> in a RAID 1 configuration.  Both drives were purchased at the same
> time and were installed in the box on 2016-05-30.  Although hree and
> one half years ago, this particular box is only used six months out of
> twelve.  I would not have thought that drives -- if they last the
> first year -- would not show signs of failure after 1.75 years.
> In any event, I ran smartctl -a on both drives.  For both "SMART
> overall-health self-assessment test result [was] 'PASSED'"
> Nevertheless for all the specific attributes, identical for both
> drives, three of them had the indication 'Pre-fail' and 'Old-age' for
> the other nineteen.
> I also ran 'badblock -v'.  Both had 1953514583 blocks.  The test for
> /dev/sda was interrupted at block 738381440, and for /dev/sdb at block
> 42064448.
> I am not sure what all these test results mean, or how accurate they
> would be for indicating if or when a failure would occur. It did occur
> to me that if after copying all my data files to an external hard
> drive I could replace the /dev/sdb device with a new one and copy all
> the data in /dev/sda on the assumption with a new and presumably
> pristine drive the OS given the choice would access the data it wanted
> from the drive which responded the quicker.

Make sure the firmware is up to date. download the cd image from seagate. 
or other makers site and reboot to it. I've updated several drives that 
way and have never lost a single bit. But the usual ymmv warning should 
be kept in mind. 
> If that approach worked I could replace the other drive in another
> year or two (really one year of use) so that both drives in the RAID 1
> would not be of the same age.
> Comments and advice as to the best way of getting this computer back
> to 'normal' to the extent that such a state could ever be 'normal'.
> Regards Ken

Cheers, Gene Heskett
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>

Reply to: