Can't add a disk to a mirror vdev (or replace one)

Status
Not open for further replies.

corwin

Dabbler
Joined
Oct 30, 2013
Messages
12
Greetings,

Running FreeNAS-9.3-STABLE-201511040813

I am trying to either replace a drive in a mirrored vdev (part of a stripe of mirrors) or add a third drive to that mirror, then remove one of the other ones. However, I am getting the following error when I try it:

sudo zpool replace tank gptid/b3fa685b-50cb-11e4-8bcb-0cc47a054ef0 gptid/fca10d71-9420-11e5-a73c-0cc47a054ef0
cannot replace gptid/b3fa685b-50cb-11e4-8bcb-0cc47a054ef0 with gptid/fca10d71-9420-11e5-a73c-0cc47a054ef0: no such pool or dataset

The same error occurs when doing an attach.

Here's the status...

pool: tank
state: ONLINE
scan: scrub in progress since Thu Nov 26 01:38:51 2015
949G scanned out of 5.42T at 145M/s, 9h3m to go
0 repaired, 17.08% done
config:

NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gptid/eb6fd2b5-4092-11e4-a523-0cc47a054ef0 ONLINE 0 0 0
gptid/7fd1a28c-26a9-11e4-af8d-d050991b61e1 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
gptid/ea63a532-4092-11e4-a523-0cc47a054ef0 ONLINE 0 0 0
gptid/9d6483eb-26a9-11e4-af8d-d050991b61e1 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
gptid/e96503b7-4092-11e4-a523-0cc47a054ef0 ONLINE 0 0 0
gptid/b6d797be-26a9-11e4-af8d-d050991b61e1 ONLINE 0 0 0
mirror-3 ONLINE 0 0 0
gptid/02608870-40e8-11e4-95c7-0cc47a054ef0 ONLINE 0 0 0
gptid/b3fa685b-50cb-11e4-8bcb-0cc47a054ef0 ONLINE 0 0 0

errors: No known data errors

I KNOW I've done this under various forms of Solaris, but I can't seem to make it work here.

Any thoughts?
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Please use the web GUI to do drive replacement; follow the steps in the documentation ;)
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
The web GUI is not stellar at manipulating mirrors. (As in it sucks bad.)

OP, what happens if you do

Code:
ls /dev/gptid/fca10d71-9420-11e5-a73c-0cc47a054ef0


My guess is it isn't there. How did you generate the disklabel for the disk you're trying to attach? The easiest way is to use the volume manager, create a new one-disk pool, then detach the pool without destroying the data on the disk. This will then give you a properly labeled disk that can be added to a mirror via gptid.
 

corwin

Dabbler
Joined
Oct 30, 2013
Messages
12
When I ls it, it's there (I did check that). I got the label, btw, from gpart on the drive (da6). I wasn't using the GUI, btw, as you said, it sucks. I've been doing it from the command line.

The back story is as follows: The pool is 'tank'. Tank was originally constructed by drives a0, a1, b0, b1 and s, all 2 TB disks, and c0 and c1, both 1.5 TB disks.
tank was a stripe of three mirrors {{a0,a1},{b0,b1},{c0,c1}} with s as the hot spare.

Sometime in the last few months (that's what I get for not watching my logs), c0's SATA cable disconnected. s was swapped in as c0's replacement (so all worked according to plan). Now I've fixed c0's cable (that's the fca10d71-9420-11e5-a73c-0cc47a054ef0 drive), so I now have {{a0,a1},{b0,b1},{s,c1}} with no spare. I can't use c0 as a spare, as it is too small to replace a* or b*. I need to now swap c0 for s in 'tank' so I can get my spare back.

Any thoughts?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I've never tried that. Is autoexpand enabled? I kinda think maybe it is, and if so, maybe that's hosing things (possibly irreversibly). If it's enabled, try turning it off. Then add c0 to c1. Wait for resilver. This will make a three-wide mirror. If it does that, then just detach s and call it a day.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
So you tried an attach of c0 to c1 and it wouldn't let you?
 
Status
Not open for further replies.
Top