Device unavailable when adding mirror disk

Status
Not open for further replies.

Bweidenm

Cadet
Joined
Mar 13, 2013
Messages
5
I am trying to add a mirror disk to a pool which currently holds one vdev with one disk. According to the manual on the Oracle ZFS site this can be done with
# zpool add <pool> mirror <master device> <mirror device>

When I try to simulate this with the -n option everything looks great (even though I need to use -f option since the mirror disk is 2TB whereas the original is only 500GB). However, when I execute the command at the end, I get an error message stating
"cannot add to 'dpool1': one or more devices is currently unavailable".

Does anyone know what might be causing this? Comands and output is shown below.

Thanks,
Bernd

[root@lavazza] ~# zpool status
pool: dpool1
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
dpool1 ONLINE 0 0 0
gptid/2775e008-8ad8-11e2-84d9-001e8c765d9a ONLINE 0 0 0

errors: No known data errors

[root@lavazza] ~# zpool add -n dpool1 mirror /dev/ada1 /dev/ada0
invalid vdev specification
use '-f' to override the following errors:
mirror contains devices of different sizes
[root@lavazza] ~# zpool add -fn dpool1 mirror /dev/ada1 /dev/ada0
would update 'dpool1' to the following configuration:
dpool1
gptid/2775e008-8ad8-11e2-84d9-001e8c765d9a
mirror
ada1
ada0

[root@lavazza] ~# zpool add -f dpool1 mirror /dev/ada1 /dev/ada0
cannot add to 'dpool1': one or more devices is currently unavailable
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I'm not sure, but I think you only want to add the disk that isn't already part of the pool, that's why its telling you one of the devices is unavailable. Is the disk you're trying to add bigger or smaller?

EDIT: Or maybe you need to offline your pool first.
 

Bweidenm

Cadet
Joined
Mar 13, 2013
Messages
5
The new mirror device is larger than the active device in the pool. There should not be an issue here.
I also checked the manpage and it clearly states you need to include the existing device in the zpool command. Otherwise the system would not be able to figure which disk in the VDEV you actually wanted to mirror. I also could not find anything about having to detach the entire pool to do this operation. The whole idea behind zpool is that you can resilver online, isn't it?
Any other ideas?
 

Bweidenm

Cadet
Joined
Mar 13, 2013
Messages
5
I think I found the error. zpool does not manage my drives under the names ada0, ada1 as shown in the freenas GUI but rather as "gptid/<very long id>". When running zpool attach with those device ids, it seems to work. The drives are currently resilvering and status shows progress as shown below. You can also see the strange device names below. Can someone comment on whether this is the way this is supposed to work?

[root@lavazza] ~# zpool status dpool1
pool: dpool1
state: ONLINE
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Fri Mar 29 02:11:09 2013
21.8G scanned out of 374G at 50.8M/s, 1h58m to go
21.8G resilvered, 5.81% done
config:

NAME STATE READ WRITE CKSUM
dpool1 ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gptid/2775e008-8ad8-11e2-84d9-001e8c765d9a ONLINE 0 0 0
gptid/272c6b72-9848-11e2-b1fd-28924a306196 ONLINE 0 0 0 (resilvering)

errors: No known data errors
 
Status
Not open for further replies.
Top