SOLVED Convert a mirror stripe into a single drive stripe

Status
Not open for further replies.

level1702

Dabbler
Joined
May 7, 2018
Messages
11
Hello everyone,

A week ago, I got an alert saying that a few sector we're unreadable (pending). So I bought a new drive and converted my single drive pool to a mirror one with both my faulty and new drive. The problem is that I'm not planning to buy a second drive so I want to remove the faulty drive to see if a complete wipe of the disk could do anything good and if it doesn't, I want to be able to switch my pool to a single drive one so that FreeNAS stop spamming me with error message and that I can use the faulty drive for testing purposes.

I apologize for my bad english.

Thank you for your anwsers
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
It is possible. You use the command line to detach the disk/partition in question.

Whether this is advisable is a different thing
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Parts of mirror vdevs can be detached as Stux wrote:
Code:
root@freenas-pmh:~ # zpool status ssd
  pool: ssd
 state: ONLINE
  scan: scrub repaired 0 in 0 days 00:01:57 with 0 errors on Sun May  6 13:27:34 2018
config:

	NAME											STATE	 READ WRITE CKSUM
	ssd											 ONLINE	   0	 0	 0
	  mirror-0									  ONLINE	   0	 0	 0
		gptid/19c3909e-4272-11e8-a1f7-0cc47afa3c72  ONLINE	   0	 0	 0
		gptid/f7c524b9-5111-11e8-8cd2-0cc47afa3c72  ONLINE	   0	 0	 0

errors: No known data errors
root@freenas-pmh:~ # zpool offline ssd gptid/f7c524b9-5111-11e8-8cd2-0cc47afa3c72
root@freenas-pmh:~ # zpool detach ssd gptid/f7c524b9-5111-11e8-8cd2-0cc47afa3c72


Not that I would do that to my pool ;)

HTH,
Patrick
 

level1702

Dabbler
Joined
May 7, 2018
Messages
11
Ok thank you for your anwsers ! But why exactly is it not a good idea (outside of the fact that I will remove the redundancy of my pool) ?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Precisely because you don't have any redundancy. Hardware is out to get you. ZFS protects you against bad hardware ...

Patrick
 

level1702

Dabbler
Joined
May 7, 2018
Messages
11
Sorry to unburry this death thread but I'm not able to offline my drive (which is now removed from the NAS by the way).
Code:
root@NAS:~ # zpool offline NAS 2360576371682270326
cannot offline 2360576371682270326: no valid replicas
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Think you'll find you can't offline the drive, because its "REMOVED". As can be witnessed by you not having a gptid for it.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
In other words: it is offline, already - try to detach or remove it.

Patrick
 

level1702

Dabbler
Joined
May 7, 2018
Messages
11
So after a little bit of testing with and without the faulty hard drive and here are the results

(With HDD)
Code:
root@NAS:~ # zpool offline NAS /dev/gptid/64c55dff-ebb9-11e5-812c-001fd08e5c4f
cannot offline /dev/gptid/64c55dff-ebb9-11e5-812c-001fd08e5c4f: no valid replicas

root@NAS:~ # zpool detach NAS /dev/gptid/64c55dff-ebb9-11e5-812c-001fd08e5c4f
cannot detach /dev/gptid/64c55dff-ebb9-11e5-812c-001fd08e5c4f: no valid replicas

root@NAS:~ # zpool remove NAS /dev/gptid/64c55dff-ebb9-11e5-812c-001fd08e5c4f
cannot remove /dev/gptid/64c55dff-ebb9-11e5-812c-001fd08e5c4f: only inactive hot spares, cache, top-level, or log devices can be removed


(Without HDD)
Code:
root@NAS:~ # zpool offline NAS 2360576371682270326
cannot offline 2360576371682270326: no valid replicas

root@NAS:~ # zpool detach NAS 2360576371682270326
cannot detach 2360576371682270326: no valid replicas

root@NAS:~ # zpool remove NAS 2360576371682270326
cannot remove 2360576371682270326: only inactive hot spares, cache, top-level, or log devices can be removed


So any of that seems to work. Do you have other ideas?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Hmm ...
  • insert disk
  • zpool replace
  • zpool offline
  • zpool detach
  • remove disk
Good luck.
Patrick
 

level1702

Dabbler
Joined
May 7, 2018
Messages
11
Here is what zpool satus is giving me for this pool

Code:
root@NAS:~ # zpool status NAS
		NAME											STATE	 READ WRITE CKSUM
		NAS											 ONLINE	   0	 0	 0
		  mirror-0									  ONLINE	   0	 0	 0
			gptid/64c55dff-ebb9-11e5-812c-001fd08e5c4f  ONLINE	   0	 0	 7
			gptid/029bf372-4e21-11e8-af61-001fd08e5c4f  ONLINE	   0	 0	 0  (resilvering)

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

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
cannot detach /dev/gptid/64c55dff-ebb9-11e5-812c-001fd08e5c4f: no valid replicas
So the problem is that the other disk is resilvering. Once that finishes, you should be able to complete this.
 

level1702

Dabbler
Joined
May 7, 2018
Messages
11
Code:
root@NAS:~ # zpool status NAS
  pool: NAS
 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: resilvered 2.37T in 0 days 08:34:58 with 9 errors on Fri Jul 27 20:40:32 2018
config:

		NAME											STATE	 READ WRITE CKSUM
		NAS											 ONLINE	   0	 0	 9
		  mirror-0									  ONLINE	   0	 0	18
			gptid/64c55dff-ebb9-11e5-812c-001fd08e5c4f  ONLINE	   0	 0	18
			gptid/029bf372-4e21-11e8-af61-001fd08e5c4f  ONLINE	   0	 0	18

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

level1702

Dabbler
Joined
May 7, 2018
Messages
11
Code:
root@NAS:~ # zpool detach NAS gptid/64c55dff-ebb9-11e5-812c-001fd08e5c4f
cannot detach gptid/64c55dff-ebb9-11e5-812c-001fd08e5c4f: no valid replicas

No
 
Status
Not open for further replies.
Top