Page 1 of 1

[SOLVED] Adding a disk to single disk stripe vdev to make it mirror

Posted: 14 Nov 2016 11:13
by breimer273
Hey guys, I found a post from a year ago that address a very similar question, but it died and I didn't think I needed to revive it. So anyway, I started out with a modest 500GB single disk vdev setup as a stripe. Then I wanted to add a second 750GB hard drive to that vdev in order to create a mirrored vdev. Within the webgui I went into Disks|ZFS|Pools|Tools and clicked "Attach a data device." I did not check force operation, but I did click on the pool and clicked on the current device and the drive I wanted to attached. That process resulted in this Command:

Code: Select all

Nov 13 20:40:03	nas4free	root: zpool attach 'zpool' '/dev/ada1' 'ada2'
.

So now here's were I sit:

Code: Select all

pool: zpool
 state: ONLINE
  scan: resilvered 312G in 2h13m with 0 errors on Sun Nov 13 22:53:57 2016
config:

	NAME        STATE     READ WRITE CKSUM
	zpool       ONLINE       0     0     0
	  mirror-0  ONLINE       0     0     0
	    ada1    ONLINE       0     0     0
	    ada2    ONLINE       0     0     0

errors: No known data errors
ada2 was the disk I added. To me this seems like it didn't actually mirror the data? since it says mirror-0. Also on the Disks|ZFS|Pools|Virtual Device|Edit page, I only see ada1, no sign of ada2 anywhere.

So, did I screw this up? Is there any way to fix it? I plan on adding more mirrors soon, so if I need to just start with a new pool to make sure all of my vdevs are mirrors, I will do that. Thanks for the help guys!

Re: Adding a disk to single disk stripe vdev to make it mirror

Posted: 14 Nov 2016 11:53
by raulfg3
revise the size of the pool, must not change, you still have 500GB of data pool ( 250gb of your 750GB are wasted).

If YES = You have a ZFS pool Mirror, otherwise if you have a 1,2TB pool, you do not have a mirror , have a ZFS stripe.

PD: For the info you provide, I'm sure that you have a ZFS Mirror, but please check it.

Re: Adding a disk to single disk stripe vdev to make it mirror

Posted: 14 Nov 2016 11:56
by ChriZathens
I don't see anything wrong in your setup.
mirror-0 is just the first mirror. If you create another mirror in this pool it will be named mirror-1, then mirror-2 and so on.
The fact that in webui you don't see the vdev change is because you most probably need to go to "Disks|ZFS|Configuration|Synchronize" and synchronize your Pool

Re: Adding a disk to single disk stripe vdev to make it mirror

Posted: 14 Nov 2016 12:24
by breimer273
Thanks for the replies! The synchronize made everything show up as expected, the size of the pool is still about 500GB.