Post by ***@yahoo.co.ukPost by Adrian CasperszPost by ***@yahoo.co.ukHi All,
I am running Ubuntu on my file server and noticed in dmesg a load of the following errors (there are a lot of other lines per instance but this seems to be the main one)
blk_update_request: I/O error, dev sdb, sector 5621815688 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
The line is always the same so assumed there is one sector which is giving a problem. I run badblocks and it found 4 bad blocks as follows
2810907844
2810907845
2810907846
2810907847
Before that, what is the drive SMART health say?
Plenty of tools for that, like https://www.smartmontools.org/
For a spinning drive if you see, 'reallocated sector count' anything but
zero, or a silly 'head load count' I would not trust the drive with
anything.
--
Adrian C
Hi All,
Thanks for all the suggestions. I have run smartctl (output below) but as far as I can see there are no reallocated sectors and SMART is not registering any errors. How would I determine which file has the bad blocks in it to force the reallocation as some have suggested? Only other info I can add is that I have noticed a file I can't seem to delete. If you do a "ls -l" on the directory I get
-????????? ? ? ? ? ? 20160913_110018.jpg.tmp
Wonder if this is the file in question?
This is the output from "smartctl -a"
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-92-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Red
Device Model: WDC WD30EFRX-68EUZN0
Serial Number: WD-WCC4N1002037
LU WWN Device Id: 5 0014ee 20a0f3b81
Firmware Version: 80.00A80
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Sun Jan 9 17:37:14 2022 GMT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
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.
Total time to complete Offline
data collection: (39900) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 400) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x703d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 20699
3 Spin_Up_Time 0x0027 176 171 021 Pre-fail Always - 6183
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 418
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
7 Seek_Error_Rate 0x002e 100 253 000 Old_age Always - 0
9 Power_On_Hours 0x0032 023 023 000 Old_age Always - 56704
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 415
192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 219
193 Load_Cycle_Count 0x0032 195 195 000 Old_age Always - 17353
194 Temperature_Celsius 0x0022 119 102 000 Old_age Always - 31
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 1
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Conveyance offline Completed without error 00% 0 -
# 2 Short offline Completed without error 00% 0 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
Thanks again for all your help
Lee.
First of all, your SMART Data isn't the end of the world.
I would still make a copy of the data now, using ddrescue,
awaiting "resolution" of the drive status. You should copy the
data off the drive now, either file-by-file or as an image/clone
with ddrescue.
Duff ------- Good # No third drive needed in this picture.
Drive DD copy # We will try to fix Duff Drive.
I try to research these hard drive terms as best I can. However,
by observing the behavior over a long period of time (twenty years),
it would appear Seagate behavior does not match just about
all the "information" web pages I can find.
The information online says that first a Current_Pending is logged.
It gets resolved, and the Reallocated_Sector_Count gets incremented
if the problem was resolved by Reallocation.
The first problem is, the Reallocated_Sector_Count (which is zero on
yours at the moment), is a thresholded count. They don't show you
the real count, because if the manufacturer did that, you would
"cherry-pick" new drives, until you "got one with a low count".
You would keep returning brand new hard drives to the store, until
the counter was as close to zero as you could make it. Obviously, this
is bad for business.
It was considered acceptable at one time, to ship drives with 100,000
reallocations on them. The 100,000 number is subtracted from the
real count. Only if the result is a positive integer, does a count
show for the drive. So when Reallocated shows 1 in the Raw_Data field,
it's really 100,001 (or some other large integer representing the
acceptance criterion for new drives).
This means when the drive is in the prime of life and full of vigor,
that counter stays at zero. It stays at zero, even if sectors are
being spared out and reallocated. You cannot watch the drive burn
through its "life", as the counter won't let you watch.
Then, one day, out of the blue, the Reallocated starts to increase from
zero. Typically, you might see them come in "bunches", depending
on the write activity level of the drive.
OK, so while you are watching this going on, you look at Current_Pending.
What do you notice ? Well, the damn thing is not coming off the pegs
and is staying at zero. Somebody lied to us!
My observation is, Yes, Current_Pending does go non-zero. But it picks
a particular time to go non-zero. It's when the drive is headed for
trouble, and a section of the disk doesn't have any spares left.
SOMETHING, some resource is running low. That is when Current_Pending
goes non-zero. The Internet description of the behavior, then works
in the expected manner. Items decremented from Current_Pending,
show up in Reallocated.
What can we conclude about your drive. The drive is Seagate (so
Current_Pending sense is "altered"). You have no Reallocated
(raw_data is zero). That is good. But the fact you have a Current_Pending
showing, means there is probably more to the problem you are
showing us, than meets the eye.
This is NOT the time to have a big grin on your face, delete the
file and move on.
The drive needs to be flushed and restored. The flushing allows
the "true nature" of the drive to shine through. When to stop
using a drive is a judgment call. For example, of the drives
that I have purchased and managed here myself, no drive has failed
here in more than 20 years. I have three failures total from
before that. Two Maxtors (probably motor controller failures), and
a Seagate 32550N that died in spectacular fashion (head assembly
jammed in head lock solenoid). Even the unhealthy Seagate 500GB
drives I have here, some with as few as 8000 hours on them, they
show bad counts, but the drives still aren't dead. I use these as
scratch drives -- the "only copy" of data never goes on those drives.
*******
So here's the deal.
You can:
1) Copy the files off, in a file-by-file fashion, to a second drive.
But now, you don't really know whether the files have good integrity
or not. It's a copy, but it might not be the best, sweetest copy.
Zero the drive out with "dd" in Linux. For example, if fdisk or gdisk
tells you the drive size rounds to cylinders, perhaps this is enough.
What is magic about that number ? 63 divides into it.
sudo dd if=/dev/zero of=/dev/sdb bs=221184 # DESTRUCTIVE cleaning...
Now, scan the clean drive with ddrescue and build a log of unreadable sectors.
Since the write operation attempted by the "dd" has given a chance
for Pending items to be removed, any new Current_Pending we see now
are bad news. The Current_Pending "grow" as this command progresses
to completion.
sudo ddrescue -f -n /dev/sdb /dev/null /root/rescue.log # Generate log only
That scans the disk, and gives an idea how many sectors cannot be read.
At the same time, it allows the drive to "grow" the Current_Pending.
If the drive was perfectly healthy, the Current_Pending after this
run would be zero Raw_Data.
mkfs.ntfs and copy the files back, assuming nothing you see during the
cleaning in this section, showed worrying signs.
You could also dd_copy the disk back, instead of file by file, if you
want. Then CHKDSK etc.
OR
2) Do nothing. Use file system level tools. Make the file go away.
Delete the directory. Create the directory. Copy the single directory
of files in it back.
But now, you should enhance your backup procedures. The problem is,
at least a few utilities, they will "bail" on the backup, if more
CHKDSK-style errors show up. Backups are intolerant of health problems.
You cannot have "100% adequate" backups, on a drive that is screwing itself
into the ground. The backup software won't let you. To make backups of
unhealthy drives, that is a HELL of a job, and your time is important
to you.
One thing you're going to learn about hard drives is, the
bigger the drives are that you buy, the longer and longer
these attempted-repair procedures take. Something I was doing
with a 6TB the other day (not really a big drive), it took
12 hours. You tend to lose track of what step you're at, when
things are that slow. It is not uncommon for people doing RAID
recovery, for a single step to take a whole week! This tends
to make people avoid maintenance and rely on "Prayer" for
their protection.
HTH,
Paul