No look for reallocated sector count or some such.  The disk is supposed to say 
how many it's done and how many are left.  There's a screenshot on a windows 
SMART program that shows it graphically:

https://crystalmark.info/en/software/crystaldiskinfo/

Some info may be here

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

One problem with smart disks these days is that many of them will do a 
read/write "scrub" on a failing sector dozens of times in an effort to "heal" 
it.  Borrowing from the spinwrite marketing baloney from years past.  If 
there's a series of bad sectors in a row the disk can take 30 minutes or more 
doing this before finally deciding to do an internal permanent re-map of the 
bad sectors or just failing entirely, whichever comes first.  So you go to 
write a file and the machine takes forever because underneath it all the disk 
is hammering itself to death in a Hail Mary to save your data.

SMART attributes appear to be vendor-defined so they are not all common in 
between disks.  The disks also sometimes lie in saying how many reallocated 
sectors they have.

Disks also love to lie like dogs on how many blocks and sectors and such they 
have.  So the idea of a low level edit is out of the question.

Some disks marketed to those cheap little NAS devices are labeled red and those 
will just error out on a sector fail for the bad sector.

Most disks will NOT reallocate a bad sector unless you try writing to it.  This 
can be a problem with filesystems that write to a sector by reading it first 
then writing it.

If you suspect a disk, doing a dd if=/dev/zero  of=/dev/disk0 or whatever your 
device is, over the entire disk, will sometimes force remaps on any bad sectors 
and the disks will return to normal speed.

Ted

-----Original Message-----
From: PLUG <plug-boun...@pdxlinux.org> On Behalf Of Dick Steffens
Sent: Thursday, June 15, 2023 11:43 AM
To: plug@pdxlinux.org
Subject: Re: [PLUG] Sluggish response

On 6/14/23 07:43, Tomas Kuchta wrote:
> On Wed, Jun 14, 2023, 01:41 Ted Mittelstaedt<t...@portlandia-it.com>  wrote:
>
>> If it is a magnetic media drive that is older the drive could be 
>> suffering end stage sector failure where the bad sector table is 
>> filled up.  I've seen it many times and it always makes the drive get 
>> very slow
>>
>> Ted.
>>
> Bad sectors should be evident in Smart tools. It might be good idea to 
> check it to prove/dis-proof disk issues.
>
> -T

> rsteff@ENU-1:~$ sudo smartctl -H /dev/sdb smartctl 7.1 2019-12-30 
> r5022 [x86_64-linux-5.4.0-150-generic] (local
> build)
> Copyright (C) 2002-19, Bruce Allen, Christian Franke, 
> www.smartmontools.org
>
> === START OF READ SMART DATA SECTION === SMART overall-health 
> self-assessment test result: PASSED

I've run a few other smartctl options. I don't really know what I should 
specifically be looking for. One of the results said

> Offline data collection status:  (0x00) Offline data collection 
> activity
>                     was never started.
>                     Auto Offline Data Collection: Disabled.
> Self-test execution status:      (   0)    The previous self-test 
> routine completed
>                     without error or no self-test has ever
>                     been run.

Is there something I should be running?

--
Regards,

Dick Steffens

Reply via email to