Reattach disk that came unplugged.

Status
Not open for further replies.

The_Ianator

Cadet
Joined
Mar 29, 2016
Messages
9
While installing a fan one of my disks came unplugged and now my volume is degraded, zpool status says to "attach the missing device and online it using 'zpool online'" and had this link: http://illumos.org/msg/ZFS-8000-2Q

I can't figure out how to attach it, everything I've tried has resulted in either "no such device in pool" or "can only attach to mirrors and top-level disks"

Looking at usage for attach ("attach [-f] <pool> <device> <new-device>") I'm assuming I'm getting either "device" or "new device" wrong. Under view disks "ada2" is the one that came unplugged, is this not "new device"? and if it is what's "device" because the name of the unavailable device in "zpool status" doesn't seem to do the trick.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Stop trying random commands before you wreck your pool.

What's the output of zpool status? [CODE][/CODE] tags please.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
You'd use zpool online, not zpool attach. The status message tells you this, so why are you looking at the usage for zpool attach? Or just reboot the server, and the disk will come back online, and the system will resilver anything that needs to be resilvered.

Edit: I think I saw in the release notes for 9.10.1-U3 that it adds a button to Online an Offline disk. That would be a very good addition.
 

The_Ianator

Cadet
Joined
Mar 29, 2016
Messages
9
Just rebooted to run zpool status and it's still in the state I left it in. The status message says to "attach the missing device" and then "online it using 'zpool online'" running zpool online gets me "
cannot online ada2: no such device in pool"

Here's zpool status:

Code:
pool: Encrypted_RaidZ2_Volume																									
state: DEGRADED																													
status: One or more devices could not be opened.  Sufficient replicas exist for													
		the pool to continue functioning in a degraded state.																	  
action: Attach the missing device and online it using 'zpool online'.															  
   see: http://illumos.org/msg/ZFS-8000-2Q																						
  scan: scrub repaired 0 in 10h49m with 0 errors on Sun Oct 23 10:49:20 2016														
config:																															
																																	
		NAME												STATE	 READ WRITE CKSUM											
		Encrypted_RaidZ2_Volume							 DEGRADED	 0	 0	 0											
		  raidz2-0										  DEGRADED	 0	 0	 0											
			gptid/3b260adc-f15b-11e5-86ba-d05099c0adf0.eli  ONLINE	   0	 0	 0											
			251312548185727368							  UNAVAIL	  0	 0	 0  was /dev/gptid/96629738-f1ea-11e5-9148-d0509
9c0adf0.eli																														
			gptid/3ccc570c-f15b-11e5-86ba-d05099c0adf0.eli  ONLINE	   0	 0	 0											
			gptid/3daa79ba-f15b-11e5-86ba-d05099c0adf0.eli  ONLINE	   0	 0	 0											
			gptid/3e7d774e-f15b-11e5-86ba-d05099c0adf0.eli  ONLINE	   0	 0	 0											
			gptid/3f531c7c-f15b-11e5-86ba-d05099c0adf0.eli  ONLINE	   0	 0	 0											
			gptid/40281805-f15b-11e5-86ba-d05099c0adf0.eli  ONLINE	   0	 0	 0											
			gptid/40f451fb-f15b-11e5-86ba-d05099c0adf0.eli  ONLINE	   0	 0	 0											
																																	
errors: No known data errors
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Re-attach an encrypted disk...

May be easier to just replace the disk with itself.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Output of camcontrol devlist, please.
 

The_Ianator

Cadet
Joined
Mar 29, 2016
Messages
9
Yes, Encrypted

camcontrol devlist:
Code:
<WDC WD40EFRX-68WT0N0 82.00A82>	at scbus0 target 0 lun 0 (ada0,pass0)															
<WDC WD40EFRX-68WT0N0 82.00A82>	at scbus1 target 0 lun 0 (ada1,pass1)															
<WDC WD40EFRX-68WT0N0 82.00A82>	at scbus2 target 0 lun 0 (ada2,pass2)															
<WDC WD40EFRX-68WT0N0 82.00A82>	at scbus3 target 0 lun 0 (ada3,pass3)															
<WDC WD40EFRX-68WT0N0 82.00A82>	at scbus4 target 0 lun 0 (ada4,pass4)															
<WDC WD40EFRX-68WT0N0 82.00A82>	at scbus5 target 0 lun 0 (ada5,pass5)															
<Marvell Console 1.01>			 at scbus9 target 0 lun 0 (pass6)																 
<WDC WD40EFRX-68WT0N0 82.00A82>	at scbus14 target 0 lun 0 (ada6,pass7)														   
<WDC WD40EFRX-68WT0N0 82.00A82>	at scbus15 target 0 lun 0 (ada7,pass8)														   
<SanDisk Cruzer Fit 1.27>		  at scbus17 target 0 lun 0 (da0,pass9)   
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Yes, Encrypted
Ugh.

Wipe the drive and replace it with itself, carefully following the instructions in the manual, for encrypted pools.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Replacing the disk with itself may be necessary (encryption is rarely a good idea), but before you do that, try zpool online Encrypted_RaidZ2_Volume gptid/96629738-f1ea-11e5-9148-d05099c0adf0.eli.
 

The_Ianator

Cadet
Joined
Mar 29, 2016
Messages
9
Got "warning: device 'gptid/96629738-f1ea-11e5-9148-d05099c0adf0.eli' onlined, but remains in faulted state use 'zpool replace' to replace devices that are no longer present" from that, and zpool status seems unchanged. Guess I'll go forward with replacing the disk with it self. Seems overly complicated for a cable coming unplugged. Thanks for all the help.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Procedure for unencrypted pools:
  • Plug drive back in
What, you expected more steps? Turn around and you'll see the short resilver has already finished.
 
Status
Not open for further replies.
Top