Currently unreadable (pending) sectors

Status
Not open for further replies.

SAINT

Dabbler
Joined
Jun 20, 2015
Messages
16
I've seen a few threads with the same questions but none seem to explain what exactly to look for in the outputs, they just give an answer based on the output. Sorry in advanced if this is a simple question.

I just noticed a few errors showing up in my alert system;

Code:
CRITICAL: Sept. 24, 2016, 1:05 p.m. - Device: /dev/ada1, 2 Currently unreadable (pending) sectors
CRITICAL: Sept. 28, 2016, 10:05 p.m. - Device: /dev/ada1, Self-Test Log error count increased from 0 to 1
CRITICAL: Sept. 24, 2016, 1:05 p.m. - The volume Storage (ZFS) state is ONLINE: One or more devices has experienced an error resulting in data corruption. Applications may be affected.

I've done a zpool status and run a long SMART test on ada1 but I'm not sure what I'm looking for in the output. I'm running raidz1 so should I be looking at replacing and RMAing the drive? Should I leave it for now and keep an eye on it or is this nothing to worry about? It's mostly just a media server and nothing on it is irreplaceable.

The outputs are bellow, and thanks in advance for any help.
Code:
[root@freenas] ~# zpool status
  pool: Storage
state: ONLINE
status: One or more devices has experienced an error resulting in data
		corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
		entire pool from backup.
   see: http://illumos.org/msg/ZFS-8000-8A
  scan: scrub repaired 0 in 7h42m with 1 errors on Sun Sep  4 07:42:13 2016
config:

		NAME											STATE	 READ WRITE CKSUM
		Storage										 ONLINE	   0	 0	 0
		  raidz1-0									  ONLINE	   0	 0	 0
			gptid/91fade9a-167f-11e5-8fe1-e83935126c1a  ONLINE	   0	 0	 0
			gptid/92d588de-167f-11e5-8fe1-e83935126c1a  ONLINE	   0	 0	 0
			gptid/93b56ab5-167f-11e5-8fe1-e83935126c1a  ONLINE	   0	 0	 0
			gptid/9498dcbf-167f-11e5-8fe1-e83935126c1a  ONLINE	   0	 0	 0
			gptid/95871b13-167f-11e5-8fe1-e83935126c1a  ONLINE	   0	 0	 0
			gptid/966cd5af-167f-11e5-8fe1-e83935126c1a  ONLINE	   0	 0	 0

errors: 1 data errors, use '-v' for a list

  pool: freenas-boot
state: ONLINE
  scan: scrub repaired 0 in 0h2m with 0 errors on Tue Sep 27 03:47:24 2016
config:

		NAME		STATE	 READ WRITE CKSUM
		freenas-boot  ONLINE	   0	 0	 0
		  da0p2	 ONLINE	   0	 0	 0

errors: No known data errors

[root@freenas] ~# smartctl -a /dev/ada1
smartctl 6.5 2016-05-07 r4318 [FreeBSD 10.3-STABLE amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:	 Western Digital Red
Device Model:	 WDC WD40EFRX-68WT0N0
Serial Number:	
LU WWN Device Id: 5 0014ee 20be83553
Firmware Version: 82.00A82
User Capacity:	4,000,787,030,016 bytes [4.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: 6.0 Gb/s)
Local Time is:	Thu Sep 29 12:53:48 2016 AEST
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

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
										was never started.
										Auto Offline Data Collection: Disabled.
Self-test execution status:	  ( 121) The previous self-test completed having
										the read element of the test failed.
Total time to complete Offline
data collection:				(52680) seconds.
Offline data collection
capabilities:					(0x7b) SMART execute Offline immediate.
										Auto Offline data collection on/off supp													ort.
										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:		( 527) 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
Vendor Specific SMART Attributes with Thresholds:
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	   -														   30
  3 Spin_Up_Time			0x0027   178   177   021	Pre-fail  Always	   -														   8100
  4 Start_Stop_Count		0x0032   100   100   000	Old_age   Always	   -														   15
  5 Reallocated_Sector_Ct   0x0033   200   200   140	Pre-fail  Always	   -														   0
  7 Seek_Error_Rate		 0x002e   200   200   000	Old_age   Always	   -														   0
  9 Power_On_Hours		  0x0032   085   085   000	Old_age   Always	   -														   11208
10 Spin_Retry_Count		0x0032   100   253   000	Old_age   Always	   -														   0
11 Calibration_Retry_Count 0x0032   100   253   000	Old_age   Always	   -														   0
12 Power_Cycle_Count	   0x0032   100   100   000	Old_age   Always	   -														   15
192 Power-Off_Retract_Count 0x0032   200   200   000	Old_age   Always	   -														   5
193 Load_Cycle_Count		0x0032   200   200   000	Old_age   Always	   -														   204
194 Temperature_Celsius	 0x0022   115   108   000	Old_age   Always	   -														   37
196 Reallocated_Event_Count 0x0032   200   200   000	Old_age   Always	   -														   0
197 Current_Pending_Sector  0x0032   200   200   000	Old_age   Always	   -														   2
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   200   200   000	Old_age   Offline	  -														   12

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  Extended offline	Completed: read failure	   90%	 11193		 443													21720

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
Selective self-test flags (0x0):
  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.
 
Last edited by a moderator:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
http://daemon-notes.com/articles/system/smartmontools/current-pending

197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 2

You have two pending sectors. What this means, is the sectors couldn't be read, and if you write to them, then they should be able to be read.

# 1 Extended offline Completed: read failure 90% 11193 443 21720

You need to blow away sector 44321720. That's the one that can't be read. If you write to it, then it will be able to be read again.

( I think that's the sector count. hard to tell when its not posted as CODE)

After that... you also have another sector. Retest, and it should point to that sector... which you can then write over, and thus heal.

Of course, there might be even more, but at this stage, your disk has only found 2 sectors it couldn't read. And it thinks its just because the data there has 'faded', rather than the sector being toast (a bad block).

Once you finish blowing away the sectors, you need to run a scrub to put the right data back.

Lucky you have some redundancy ;)
 

SAINT

Dabbler
Joined
Jun 20, 2015
Messages
16
Gotta have redundancy, no matter how expendable the data is! :)

Thanks for the update and thanks for the explanation rather than just the solution! I'll get onto that see what happens.

If you don't mind, I have one more question about a step the link you provided;
when it says "disable GEOM protection and try to refresh the sector", is that done with the following commands respectively?

Code:
sysctl kern.geom.debugflags=16

and
Code:
dd if=/dev/ad1 of=/dev/ad1 bs=512 count=1 iseek=44321720 oseek=44321720 conv=noerror,sync


Or have I done something wrong? I'm not 100% sure what the debugflags, bs, count and conv variables should be.

I like to set and forget FreeNAS so each time there's a problem I need to relearn how to do everything in the shell.
 

Pitfrr

Wizard
Joined
Feb 10, 2014
Messages
1,531
To expand my knowledge, how do you "blow away" a sector?
I'd guess with a screwdriver (I'm kidding....).

Seriously, I'd say using the dd command (I would have to check for the exact syntax first since I'm not very confident with it) or is there an other way (without taking the disk out of the freeNAS box)?
 
Last edited:

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
A failed SMART test is grounds for an RMA, if you feel like going that route.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
A failed SMART test is grounds for an RMA, if you feel like going that route.

I'm not sure if Pending Sectors counts as a failure until it crosses a threshold

Code:
SMART overall-health self-assessment test result: PASSED


I recently took a drive out of a RAID5 and started using it in ZFS. The smarts found 3 pending sectors. Fixed them up.

Since then I've been scrubbing the 5 disk RaidZ2 fortnightly, and Ive just finished running the full badblocks and solnet over the disk set.

Seems good as new.

Sometimes its just bitrot.
 
Last edited by a moderator:

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Gotta have redundancy, no matter how expendable the data is! :)

Thanks for the update and thanks for the explanation rather than just the solution! I'll get onto that see what happens.

If you don't mind, I have one more question about a step the link you provided;
when it says "disable GEOM protection and try to refresh the sector", is that done with the following commands respectively?

Code:
sysctl kern.geom.debugflags=16

This disables write protection on the raw device. This means you can now write with dd to any sector on the device. It resets when you reboot.

and
Code:
dd if=/dev/ad1 of=/dev/ad1 bs=512 count=1 iseek=44321720 oseek=44321720 conv=noerror,sync

I believe the above dd code addtempts to read the pending sector, and if it succeeds, writes it back, and if it fails, writes it with zeros.

from man dd
Code:
			  noerror  Do not stop processing on an input error.  When an
					   input error occurs, a diagnostic message followed by
					   the current input and output block counts will be writ-
					   ten to the standard error output in the same format as
					   the standard completion message.  If the sync conver-
					   sion is also specified, any missing input data will be
					   replaced with NUL bytes (or with spaces if a block ori-
					   ented conversion value was specified) and processed as
					   a normal input buffer.  If the fillchar option is spec-
					   ified, the fill character provided on the command line
					   will override the automatic selection of the fill char-
					   acter.  If the sync conversion is not specified, the
					   input block is omitted from the output.  On input files
					   which are not tapes or pipes, the file offset will be
					   positioned past the block in which the error occurred
					   using lseek(2).

 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
I'm not sure if Pending Sectors counts as a failure until it crosses a threshold
# 1 Extended offline Completed: read failure 90% 11193 443 21720
Any failed SMART test is grounds for an RMA, regardless of the nature of the failure.
If you write to it, then it will be able to be read again.
Not necessarily, according to the description of attribute #197 on Wikipedia. I have personally seen #197 decremented after a full-disk write pass, without a corresponding increment in #196.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Any failed SMART test is grounds for an RMA, regardless of the nature of the failure.

Not necessarily, according to the description of attribute #197 on Wikipedia. I have personally seen #197 decremented after a full-disk write pass, without a corresponding increment in #196.

You're right.

I should've said "might". If the drive is under warranty RMA it, if its not and you want to see if you can 'fix' it, then go ahead. I did for some 3TB drives of mine, and they've been good ever since.

Funnily enough, the problematic drives where "refurbs", you know, the type you get back when you RMA a drive...
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
And you're right, returning a drive might get you a refurb, which might not be a better drive. One strategy would be to stick with the existing drive until, say, a few weeks before the warranty expires.

You have to do whatever gives you peace of mind. I lean towards a return, because then the issue is on the record.
 

Gamer0126

Dabbler
Joined
Mar 24, 2015
Messages
25
I got the same error via email this morning:
Code:
Oct. 30, 2016, 8:17 a.m. - Device: /dev/da5 [SAT], 1 Currently unreadable (pending) sectors


So I ran a long SMART self-test and I did get the following error:
Code:
Oct. 30, 2016, 1:32 p.m. - Device: /dev/da5 [SAT], Self-Test Log error count increased from 0 to 1


And I ran the script to investigate the state of the drive but for the current pending sectors raw value is zero which confuses me because all the cases I have read about has the Raw Value with 1, 2 or some value. So do I have to fix the issue or not? Not sure if I have to complete the steps listed in the link below since the raw value is zero. Can some one help me out?

Code:
Num  Test_Description	Status				  Remaining  LifeTime(hours)  LBA_of_first_error									
# 1  Extended offline	Completed: read failure	   90%	   817		 135986864

http://daemon-notes.com/articles/system/smartmontools/current-pending
Code:
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
 
Last edited by a moderator:

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
Look in my signature for the Hard Drive Troubleshooting Guide, click the link.
 
Status
Not open for further replies.
Top