For sure on that!  197 pending reallocate and 5 allocated indicates the disk
has -probably- been making ECC corrections to a lot of other sectors (soft
fails) for a while now, but slowly the number of bad sectors has increased.

During manufacture they permanently lock out bad spots on the disk and those
aren't part of the bad sector map.  Those ones aren't of any concern.  It's
the "grown defects" that are the worry.  Usually those are caused by wear on
the spindles and arm pivot causing the head to move slightly out of
alignment from prior written tracks.  The more wear the less accurate the
head is and the more likely it will have to re-read the sector.

Heat is often considered the number 1 killer of hard disks but IMHO these
days, far far more important is quality of manufacturer.  I have servers
with enterprise drives in them still going strong that are a decade or older
that run 24x7.  With Seagate SATA that's the Exos line now, prior to Exos it
was the Constellation.  Exos comes in both SATA and SAS variants.  SMART
gives you drive temperature it might be useful to check that.  Articles
abound on the Internet for proper temperature, here's one for example:

https://www.akcp.com/blog/how-temperature-affects-it-data-storage/

Drives are manufactured in such large quantities these days that they can
get them down to almost an exact science on when the disk is going to fail -
a drive with a 2 year warranty is definetly more cheaply made than a 5 year
warranty drive.  But this is just a general rule of thumb as I've got 2 year
warranty desktop drives that are 8 years old still in daily use.  Outliers
abound.  4 years on a 2 year warranty drive isn't bad but it isn't good
either - you were unlucky with that drive.  Which is why RAID was invented.
I still see failing drives, failed drives, and drives that should have
failed years ago still chugging along in servers.

With SSD's  S.M.A.R.T. data the big thing is available spare and percentage
used.  Obviously if you can keep from writing to the SSD that helps a lot,
adding enough memory is crucial.  I don't go under 16GB on desktops these
days.

Here's a good article on what you might consider doing if you move to an
SSD:

https://askubuntu.com/questions/404096/with-an-ssd-do-i-need-to-change-my-sw
appiness-to-increase-ssd-life

Theres a LOT of argument over this because of course, situations are
different and what is good for one environment is bad for another, and
usually the most passionate sides of the "muck with it" vs "leave it alone"
argument groups never bother explaining their OWN environments.

And you definitely want to make sure if you do run an SSD on Linux that it
supports TRIM you can check it with

sudo hdparm -I /dev/sda | grep 'TRIM supported'

As for transferring data - boot the system with a LIVE USB stick and just dd
the contents of one drive to the other.  If you are lucky the system should
just boot up on the new disk once you change cables

Once running you can expand the last partition with growpart:

https://www.linuxscrew.com/linux-growpart-fill-disk

Ted

-----Original Message-----
From: PLUG <plug-boun...@lists.pdxlinux.org> On Behalf Of Rich Shepard
Sent: Tuesday, November 28, 2023 6:45 AM
To: plug@lists.pdxlinux.org
Subject: Re: [PLUG] Error reading files

On Tue, 28 Nov 2023, Ted Mittelstaedt wrote:

> Get your SMART status from the disk
> Smartctl -a /dev/sda

> Look for the pending sector count and reallocated sector count. On a 
> completely healthy disk they will be zero.

Ted,

Looks like I need to replace this disk:
# smartctl -a /dev/sdb
  ...
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED  WHEN_FAILED
RAW_VALUE
197 Current_Pending_Sector 0x0012 096 096 000 Old_age Always - 712
   5 Reallocated_Sector_Ct  0x0033 100 100 010 Pre-fail Always - 0

I'll order a new disk today; the current one is about 4 years old.

This is my main drive; /dev/sdb holds /home, /opt, and /data1.

I need to learn how to transfer the data in those partitions to a new drive.

Thanks,

Rich

Reply via email to