Dumb mistake and now can't attach

Status
Not open for further replies.

danderer

Cadet
Joined
Oct 16, 2013
Messages
2
Through a series of dumb, dumb, dumb experimentation and mistakes, I have a pool to which I can not attach a drive. Saga is:

FreeNAS 9.1.1. Had a pool of 2 identical mirrored drives. While experimenting and being not-too-bright, I removed one of the mirrored drives. (Some combination of offline and detach and probably 4 other things.) The pool now looks like this:

[root@freenas ~]# zpool status
pool: tank
state: ONLINE
scan: scrub repaired 0 in 4h38m with 0 errors on Tue Oct 15 16:54:16 2013
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
ada2 ONLINE 0 0 0
errors: No known data errors
I want to reestablish the mirror, which I *think* should just be a simple attach. However that results in:

[root@freenas ~]# zpool attach tank ada2 ada1
cannot attach ada1 to ada2: no such pool or dataset
I can't figure this one out, other than that I should have RTFM before starting this silliness.

Any suggestions?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
Yeah, you should have RTFM'ed. You basically have a zpool named tank, and 2 storage locations that are striped(basically a RAID0). If the disk(or partition) labeled "tank" or ada2 fail, you will lose the pool. You have 2 single disk vdevs. The only solution if you want to go back to a mirrored configuration(which I highly recommend) is to destroy the pool and recreate it. vdevs can't be removed once added. Keep in mind that until you make your decision and take action, a failure of either disk will cause a failure of the entire pool. So I strongly recommend you make a backup very soon if you don't have one already!
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
Yeah, you should have RTFM'ed. You basically have a zpool named tank, and 2 storage locations that are striped(basically a RAID0).
That's not how I read the zpool status output. It is not properly formatted, but the "NAME STATE ..." table always first contains the name of the pool and only then the devices. So, this is not a tank pool "striped" out of a "tank" and ada2 devices. It is simply a tank pool on a single ada2 device.
However, the question still remains: why is zpool attach refusing to work? danderer, did you try to quick wipe ada1?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
That's not how I read the zpool status output. It is not properly formatted, but the "NAME STATE ..." table always first contains the name of the pool and only then the devices. So, this is not a tank pool "striped" out of a "tank" and ada2 devices. It is simply a tank pool on a single ada2 device.
However, the question still remains: why is zpool attach refusing to work? danderer, did you try to quick wipe ada1?

Doh, you are right. The formatting not being present screwed me up! Ignore my comments. I was wrong!
 

danderer

Cadet
Joined
Oct 16, 2013
Messages
2
However, the question still remains: why is zpool attach refusing to work? danderer, did you try to quick wipe ada1?

I did with no effect. But now I've just done it again and the attach seemed to work. I'll feel more confident once the resilver finishes.

Many thanks.
 
Status
Not open for further replies.
Top