unable to replace failed hard drive on zfs pool

Status
Not open for further replies.

jet09

Dabbler
Joined
Oct 30, 2015
Messages
11
One of my hard drive has failed from the zfs pool. I tried to replace the drive but keep seeing error Unable to GPT format the disk da11. Tried manually creating the GPT and replacing but no luck. Also seeing alerts in the GUI (see image).

Capture.JPG

Code:
[root@nas] ~# gpart show da11
=>		34  5860533101  da11  GPT  (2.7T)
		  34		   6		- free -  (3.0K)
		  40	 4194304	 1  freebsd-swap  (2.0G)
	 4194344  5856338696	 2  freebsd-zfs  (2.7T)
  5860533040		  95		- free -  (48K)
 
[root@nas] ~# zpool replace -f zfs 10704131734142437282 /dev/da11p2
cannot replace 10704131734142437282 with /dev/da11p2: one or more devices is currently unavailable
[root@nas] ~#
[root@nas] ~# zpool replace -f zfs 10704131734142437282 gptid/eb820693-3b8a-11e7-b37c-0cc47a9cd718
cannot replace 10704131734142437282 with gptid/eb820693-3b8a-11e7-b37c-0cc47a9cd718: one or more devices is currently unavailable
 
 
  pool: zfs
state: DEGRADED
status: One or more devices has been taken offline by the administrator.
		Sufficient replicas exist for the pool to continue functioning in a
		degraded state.
action: Online the device using 'zpool online' or replace the device with
		'zpool replace'.
  scan: resilvered 35.0M in 0h0m with 0 errors on Sun May  7 16:54:04 2017
config:
 
		NAME											STATE	 READ WRITE CKSUM
		zfs											 DEGRADED	 0	 0	 0
		  raidz2-0									  DEGRADED	 0	 0	 0
			gptid/40ab8f1d-90d1-11e5-ba6d-00259061a72c  ONLINE	   0	 0	 0
			gptid/4176415b-90d1-11e5-ba6d-00259061a72c  ONLINE	   0	 0	 0
			10704131734142437282						OFFLINE	  0	 0	 0  was /dev/da6p2
			gptid/42fea398-90d1-11e5-ba6d-00259061a72c  ONLINE	   0	 0	 0
			gptid/43bbe1ed-90d1-11e5-ba6d-00259061a72c  ONLINE	   0	 0	 0
			gptid/447e42cb-90d1-11e5-ba6d-00259061a72c  ONLINE	   0	 0	 0
			gptid/454dea8f-90d1-11e5-ba6d-00259061a72c  ONLINE	   0	 0	 0
			gptid/46090422-90d1-11e5-ba6d-00259061a72c  ONLINE	   0	 0	 0
 
errors: No known data errors
 
[root@nas] ~#  smartctl -a /dev/da11
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 ===
Device Model:	 ST3000VN007-2E4166
Serial Number:	W6A1GY0Q
LU WWN Device Id: 5 000c50 09b6957e6
Firmware Version: SC60
User Capacity:	3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:	 512 bytes logical, 4096 bytes physical
Rotation Rate:	5900 rpm
Form Factor:	  3.5 inches
Device is:		Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2, ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:	Thu May 18 01:46:29 2017 EDT
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:  (0x82) Offline data collection activity
										was completed without error.
										Auto Offline Data Collection: Enabled.
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:				(  107) 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:		(   1) minutes.
Extended self-test routine
recommended polling time:		( 378) minutes.
Conveyance self-test routine
recommended polling time:		(   2) minutes.
SCT capabilities:			  (0x10bd) SCT Status supported.
										SCT Error Recovery Control supported.
										SCT Feature Control supported.
										SCT Data Table supported.
 
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME		  FLAG	 VALUE WORST THRESH TYPE	  UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate	 0x000f   100   100   006	Pre-fail  Always	   -	   28096
  3 Spin_Up_Time			0x0003   100   100   000	Pre-fail  Always	   -	   0
  4 Start_Stop_Count		0x0032   100   100   020	Old_age   Always	   -	   1
  5 Reallocated_Sector_Ct   0x0033   100   100   010	Pre-fail  Always	   -	   0
  7 Seek_Error_Rate		 0x000f   100   253   030	Pre-fail  Always	   -	   23
  9 Power_On_Hours		  0x0032   100   100   000	Old_age   Always	   -	   1
10 Spin_Retry_Count		0x0013   100   100   097	Pre-fail  Always	   -	   0
12 Power_Cycle_Count	   0x0032   100   100   020	Old_age   Always	   -	   1
184 End-to-End_Error		0x0032   100   100   099	Old_age   Always	   -	   0
187 Reported_Uncorrect	  0x0032   100   100   000	Old_age   Always	   -	   0
188 Command_Timeout		 0x0032   100   253   000	Old_age   Always	   -	   0
189 High_Fly_Writes		 0x003a   100   100   000	Old_age   Always	   -	   0
190 Airflow_Temperature_Cel 0x0022   073   073   045	Old_age   Always	   -	   27 (Min/Max 22/27)
191 G-Sense_Error_Rate	  0x0032   100   100   000	Old_age   Always	   -	   0
192 Power-Off_Retract_Count 0x0032   100   100   000	Old_age   Always	   -	   1
193 Load_Cycle_Count		0x0032   100   100   000	Old_age   Always	   -	   1
194 Temperature_Celsius	 0x0022   027   040   000	Old_age   Always	   -	   27 (0 22 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000	Old_age   Always	   -	   0
198 Offline_Uncorrectable   0x0010   100   100   000	Old_age   Offline	  -	   0
199 UDMA_CRC_Error_Count	0x003e   194   194   000	Old_age   Always	   -	   7
 
SMART Error Log Version: 1
No Errors Logged
 
SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]
 
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.

Added code brackets by @joeschmuck
 
Last edited by a moderator:

Dice

Wizard
Joined
Dec 11, 2015
Messages
1,410
You should definitely avoid doing replacements via CLI. It is not equivalent to GUI due to the way FreeNAS is layered.
Find the right chapter in the documentation, follow the steps and report back what the situation is.
And please post code as code-tags. There is an option in the text formatting section. Or use [code.] [/code.] except for dots.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
You should definitely avoid doing replacements via CLI.
Seriously. The GUI is there for a reason--why do so many people seem to want to avoid it?
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
@danb35 If one is already in a terminal, and familiar with cli, it's often more a matter of convenience to continue doing things via cli than switching back and forth to the GUI... especially when the current UI isn't configured to be asynchronous.
  • Specific to pool maintenance, as it's not documented in the Documentation, a user isn't initially aware the process through which the GUI replaces a disk is not the same as the process of entering a few zpool commands, ergo all disk related maintenance should always be performed via the GUI.
    • With that being said, a simple forum search would turn up info within a couple of minutes informing a user they should be replacing disks through the GUI only.

@jet09 Please post log and command output within [code] brackets
 
Last edited:

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
especially when the current UI isn't configured to be asynchronous.
...which really isn't relevant here. The UI is blocked while the disk is partitioned, the swap partition enabled, and the resilver begins, and then returns control to the user. This might be a minute or so that the user can't do anything else in the GUI. The resilvering proceeds asynchronously.
 

zoomzoom

Guru
Joined
Sep 6, 2015
Messages
677
I wasn't aware of that =]
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
My process when messing around with FreeNAS lowlevel stuff will be to execute one line in CLI, then refresh GUI, run the next step there, etc

Ie, if it can be done by the GUI, then do, even if you're at the CLI.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
Wipe drive and try the GUI. Drive looks fine.
 

jet09

Dabbler
Joined
Oct 30, 2015
Messages
11
Thank you all for the feedback. Sorry about not using tags. Looks like one of the SATA output from the SAS cable was bad. That's why the GUI didn't work. Replaced the cable and everything is working now. 7 hours to go before re-silvering is done.
 
Status
Not open for further replies.
Top