Help! The Mirrored boot volume seems to have died.

Status
Not open for further replies.

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
I'm not super familiar with these commands, so you might have to spot check them. But I can point you at the documentation.

First, we have to identify and remove the bad device.
Code:
zpool list freenas-boot #get the devices in the freenas-boot pool
zpool detach freenas-boot <device> #replace <device> with the bad device from the first outputs

https://docs.oracle.com/cd/E19253-01/816-5166/zpool-1m/index.html

At this point, I would hope you would be able to see this in the GUI, and hopefully the GUI will work for adding a new boot device. One advantage to the GUI is that it will also add the boot partition stuff. If not, let me know, and I can dig up the commands we need to run to do this.
 

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
I'm not super familiar with these commands, so you might have to spot check them. But I can point you at the documentation.

First, we have to identify and remove the bad device.
Code:
zpool list freenas-boot #get the devices in the freenas-boot pool
zpool detach freenas-boot <device> #replace <device> with the bad device from the first outputs

https://docs.oracle.com/cd/E19253-01/816-5166/zpool-1m/index.html

At this point, I would hope you would be able to see this in the GUI, and hopefully the GUI will work for adding a new boot device. One advantage to the GUI is that it will also add the boot partition stuff. If not, let me know, and I can dig up the commands we need to run to do this.


Am I doing something wrong? I don't see a way to list the devices attached to the pool. The get command only lists the following properties:
Code:
PROPERTY		 EDIT   VALUES																							 
																																   
	   allocated		  NO   <size>																							 
	   capacity		   NO   <size>																							 
	   dedupratio		 NO   <1.00x or higher if deduped>																		
	   expandsize		 NO   <size>																							 
	   fragmentation	  NO   <percent>																						   
	   free			   NO   <size>																							 
	   freeing			NO   <size>																							 
	   guid			   NO   <guid>																							 
	   health			 NO   <state>																							 
	   leaked			 NO   <size>																							 
	   size			   NO   <size>																							 
	   altroot		   YES   <path>																							 
	   autoexpand		YES   on | off																							
	   autoreplace	   YES   on | off																							
	   bootfs			YES   <filesystem>																						
	   cachefile		 YES   <file> | none																					   
	   comment		   YES   <comment-string>																					
	   dedupditto		YES   <threshold (min 100)>																			   
	   delegation		YES   on | off																							
	   failmode		  YES   wait | continue | panic																			 
	   listsnapshots	 YES   on | off																							
	   readonly		  YES   on | off																							
	   version		   YES   <version>																						   
	   feature@...	   YES   disabled | enabled | active
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Sorry, that was supposed to be zpool status.
 

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
Sorry, that was supposed to be zpool status.
Ah, OK.
Code:
[root@freenas ~]# zpool status freenas-boot																						 
  pool: freenas-boot																												
 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 0 days 00:01:50 with 0 errors on Wed Feb 21 09:14:51 2018											   
config:																															 
																																   
	   NAME					  STATE	 READ WRITE CKSUM																		
	   freenas-boot			  DEGRADED	 0	 0	 0																		
		 mirror-0				DEGRADED	 0	 0	 0																		
		   da8p2				 ONLINE	   0	 0	 0																		
		   10908009586187677159  UNAVAIL	  0	 0	 0  was /dev/da9p2														
																																   
errors: No known data errors


So would the next command be:
Code:
zpool detach freenas-boot /dev/da9p2
zpool replace /dev/da9p2
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Though it might work with the /dev device, I think it will be:

Code:
zpool detach freenas-boot 10908009586187677159
I would not use replace, because it won't copy over the boot stuff. If we have to use replace, because we can't get it working in the GUI, I'll have to dig up the right commands to copy the boot sector over.
 

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
Though it might work with the /dev device, I think it will be:

Code:
zpool detach freenas-boot 10908009586187677159
I would not use replace, because it won't copy over the boot stuff. If we have to use replace, because we can't get it working in the GUI, I'll have to dig up the right commands to copy the boot sector over.

That seems to have worked. Now I just need a way to identify the "good" drive in the back on the server.
Code:
[root@freenas ~]# zpool detach freenas-boot 10908009586187677159																	
[root@freenas ~]# zpool status freenas-boot																						 
  pool: freenas-boot																												
 state: ONLINE																													 
  scan: scrub repaired 0 in 0 days 00:01:50 with 0 errors on Wed Feb 21 09:14:51 2018											   
config:																															 
																																   
	   NAME		STATE	 READ WRITE CKSUM																					 
	   freenas-boot  ONLINE	   0	 0	 0																					
		 da8p2	 ONLINE	   0	 0	 0																					 
																																   
errors: No known data errors																										
[root@freenas ~]#
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
You might have to restart, but this change should be reflected in the GUI now. You should be able to use the GUI to finish the rest of the steps, and add the mirror like "normal" now.
 

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
You might have to restart, but this change should be reflected in the GUI now. You should be able to use the GUI to finish the rest of the steps, and add the mirror like "normal" now.
Someone upthread said there is a way to issue a "dd read" command on the good drive so that it lights up. Do you know how to do that? I didn't see the command in the list while I was in the shell.
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
You should be able to do a dd with if=/dev/da8p2 and of=/dev/null.
 

geopfarth

Explorer
Joined
Apr 14, 2017
Messages
96
You know what sucks? having 5 drives that are supposed to be 16GB and all of them being less than 16GB. Amazon is now shipping me a 32GB drive. I may have to get some SSDs and move the boot over to those.
 

wblock

Documentation Engineer
Joined
Nov 14, 2014
Messages
1,506
Status
Not open for further replies.
Top