Managing Degraded SWAP Mirror

Status
Not open for further replies.

Mark_2001

Cadet
Joined
Dec 19, 2017
Messages
4
Hi,

I've been trying to find how to resolve a degraded SWAP partition mirror. (FreeNAS 11.1)

Disk /dev/ada7 is present and in good order, however its partition ada7p1 has been "removed" from the mirror swap0 as shown from the report below. Should I remove ada7 from the system and re-add it or is there a more elegant way to resolve ?

Checking status of gmirror(8) devices:
Name Status Components
mirror/swap0 DEGRADED ada6p1 (ACTIVE)
mirror/swap1 COMPLETE ada5p1 (ACTIVE)
ada4p1 (ACTIVE)
mirror/swap2 COMPLETE ada3p1 (ACTIVE)
ada2p1 (ACTIVE)

-- End of daily output --

Thanks
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Are you creating / editing your pool at the command line?
Normally the middleware would handle this for you and FreeNAS uses GPTID numbers to reference the partitions.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Including for swap?
I made an assumption. I could be wrong about it using the GPTID for the swap but it should still be managed by the middle-ware and trying to manage it manually is just asking for problems.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
trying to manage it manually is just asking for problems
I expect so, but there are no GUI tools to manage it either--it all happens automagically, or at least is supposed to. If the pool's in good shape (which is implied but not clearly stated in OP's post), what do you do to address a degraded swap mirror?

@Mark_2001, what's the output of zpool status?
 

Mark_2001

Cadet
Joined
Dec 19, 2017
Messages
4
Thanks for your reply Chris,

I've not used the command line to create or edit the pool, however my initial assessment that ada7 is stable was inaccurate. Looking back at the reports FreeNAS emails every day ada7 had an issue, and then seems to have come back online resulting in ZFS reporting that it resilvered 184K in the last scrub.

While the ZFS pools seems to have accepted the disk back, the mirrored swap seems not to have done the same. I'm guessing short of removing \ replacing the disk in the GUI (to invoke the middleware setting up the swap mirror) I should probably manually add the missing partition back to the degraded mirror.

Regards
Mark


Code:
ada7 at ahcich7 bus 0 scbus8 target 0 lun 0
ada7: <TOSHIBA HDWQ140 FJ1M> s/n 17H4K057FPBE detached
(ada7:ahcich7:0:0:0): Periph destroyed
ada7 at ahcich7 bus 0 scbus8 target 0 lun 0
ada7: <TOSHIBA HDWQ140 FJ1M> ATA8-ACS SATA 3.x device
ada7: Serial Number 17H4K057FPBE
ada7: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada7: Command Queueing enabled
ada7: 3815447MB (7814037168 512 byte sectors)


Code:
zpool status redtank																							   
  pool: redtank																													 
 state: ONLINE																													 
  scan: resilvered 184K in 0 days 00:00:02 with 0 errors on Mon Dec 18 21:33:50 2017												
config:																															 
																																   
	   NAME											STATE	 READ WRITE CKSUM												 
	   redtank										 ONLINE	   0	 0	 0												 
		 raidz1-0									  ONLINE	   0	 0	 0												 
		   gptid/95958261-1c4f-11e7-b53c-00235407e9eb  ONLINE	   0	 0	 0												 
		   gptid/36d24cb0-785b-11e7-8201-00235407e9eb  ONLINE	   0	 0	 0												 
		   gptid/975e7ed3-1c4f-11e7-b53c-00235407e9eb  ONLINE	   0	 0	 0												 
		 raidz1-2									  ONLINE	   0	 0	 0												 
		   gptid/9bd4002f-1ee8-11e7-bfab-00235407e9eb  ONLINE	   0	 0	 0												 
		   gptid/6f7febaa-794e-11e7-a9a6-00235407e9eb  ONLINE	   0	 0	 0												 
		   gptid/96c07ceb-4700-11e7-a380-00235407e9eb  ONLINE	   0	 0	 0												 
	   logs																														
		 gptid/6e964dde-9ae4-11e7-829a-00235407e9eb	ONLINE	   0	 0	 0												 
																																   
errors: No known data errors
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Check that drive's SMART data. It might be something as trivial as the cable.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
. If the pool's in good shape (which is implied but not clearly stated in OP's post), what do you do to address a degraded swap mirror?
I have looked at the text during startup and shutdown on my system to see what is being done and the swap mirrors are destroyed at shutdown and created at bootup, so you could probably fix it by simply rebooting the system.
I disconnected a pool and then reconnected the pool while the system was running and the running system does not create or use the swap on that pool while the system is up. The swap (from observation) appears only to be created at boot, not during the system up-time.
 

Mark_2001

Cadet
Joined
Dec 19, 2017
Messages
4
That's great if reboot is needed will do.

Disk is loosing sectors, probably what caused it to get detached, so I'll be replacing shortly in any event.

5 Reallocated_Sector_Ct 0x0033 100 100 050 Pre-fail Always - 14

Much appreciated
Mark
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
That's great if reboot is needed will do.

Disk is loosing sectors, probably what caused it to get detached, so I'll be replacing shortly in any event.

5 Reallocated_Sector_Ct 0x0033 100 100 050 Pre-fail Always - 14

Much appreciated
Mark
Did you get that drive replaced? All better now?
 

Mark_2001

Cadet
Joined
Dec 19, 2017
Messages
4
Thanks Chris,

Yes, all sorted after reboot. Turned out to be the PSU causing the disk to drop off and on randomly. So one new PSU and Disk and all is well.
 
Status
Not open for further replies.
Top