Expanding ZPool, but getting error message "you are trying to add a virtual dev..."

Status
Not open for further replies.

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
I have a ZFS Zpool with a single VDev consisting of 6 2TB disks in RAIDZ.

I just bougth a sata expander PCI-E card, and now I'm trying to add a new VDev made up of 4 2TB disks in RAIDZ to this same ZPool. However, I get this message from FreeNAS in the GUI:

Code:
You are trying to add a virtual device consisting of 4 device(s) in a pool that has a virtual device consisted of 6 device(s)
(also see attached for screenshot).

To my knowledge, this is fine and I can do this...right?? Why is it warning me if there is no problem with this?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Re: Expanding ZPool, but getting error message "you are trying to add a virtual dev..

I have a ZFS Zpool with a single VDev consisting of 6 2TB disks in RAIDZ.

I just bougth a sata expander PCI-E card, and now I'm trying to add a new VDev made up of 4 2TB disks in RAIDZ to this same ZPool. However, I get this message from FreeNAS in the GUI:

Code:
You are trying to add a virtual device consisting of 4 device(s) in a pool that has a virtual device consisted of 6 device(s)
(also see attached for screenshot).

To my knowledge, this is fine and I can do this...right?? Why is it warning me if there is no problem with this?

You should be fine. I think it's a general warning for those people that try and add a single disk vdev to a pool with a multidisk vdev. There could probably be some different logic implemented and the warning re-worded.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Re: Expanding ZPool, but getting error message "you are trying to add a virtual dev..

You should be fine. I think it's a general warning for those people that try and add a single disk vdev to a pool with a multidisk vdev. There could probably be some different logic implemented and the warning re-worded.


I think you are right. People were stupidly(sometimes accidentally too) adding single disks to a RAIDZ2 thinking that the vdev would expand. It doesn't, but now they had a single point of failure from which the only recovery was to delete the zpool and start over. Surprise, but it sure seems like 80% of the forum users don't do backups, so doing a zpool destroy isn't an option.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
Re: Expanding ZPool, but getting error message "you are trying to add a virtual dev..

I think it's a general warning for those people that try and add a single disk vdev to a pool with a multidisk vdev. There could probably be some different logic implemented and the warning re-worded.
It's appropriate as is. It's recommended to extend the existing pool only using the same type & number disks as the initial vdev. You of course can use other configurations, but should get a warning first.
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
Re: Expanding ZPool, but getting error message "you are trying to add a virtual dev..

Did it anyway and it's working perfectly!

Here's a follow up though.

Will data be distributed evenly after a scrub accross the entire ZPOOL (all VDevs inside of the Zpool)? Or, will it try to fill the first one up to 99% and then move onto the next vdev? I hope it's the former!
 

Stephens

Patron
Joined
Jun 19, 2012
Messages
496
Re: Expanding ZPool, but getting error message "you are trying to add a virtual dev..

Unless something has changed, and I don't believe it has, there is no auto-leveling of existing data when you add storage to a pool.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Re: Expanding ZPool, but getting error message "you are trying to add a virtual dev..

Data isn't moved around to level the loading. However, you can expect new data will heavily prefer the new vdev, so if you started copying data from the server one vdev may contain larger amounts of loading than the other. It's less than optimal to add a vdev late in a zpool's life, but not unheard of. Also, if performance is being bottlenecked at the network interface(which is the case for many people) then the whole concern really doesn't matter a whole lot.
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
Re: Expanding ZPool, but getting error message "you are trying to add a virtual dev..

Gotcha. Well, my main concern is that my ZPOOL was loaded up to almost 90% before I added the new VDev. But, I suppose as long as it doesn't do too much more on that initial vdev it should be ok. agred?
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
Gotcha. Well, my main concern is that my ZPOOL was loaded up to almost 90% before I added the new VDev. But, I suppose as long as it doesn't do too much more on that initial vdev it should be ok. agred?
You can copy, not move, all the data & then delete the original to have it to distribute the data. Given the first vdev is so full it will write nearly all the data to the new vdev though. Splitting the copy/delete in 2 parts, 1[sup]st[/sup] half & 2[sup]nd[/sup] half, would distribute it more evenly if still likely preferring the new vdev. The latest written or updated data is what's going to be fragmented. If you know what it is you could simply copy/delete that which would put it on the new vdev.

Or simply don't worry about it. ;)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Re: Expanding ZPool, but getting error message "you are trying to add a virtual dev..

Personally, I wouldn't worry about it. I did do what you did(added a vdev after the fact) and although I didn't see the performance increase I expected, my system was plenty fast to saturate 2xGb LAN connections simultaneously, so I didn't worry about it. If you can already max out your LAN connections what's the point in going "even faster"?
 

shackrock

Explorer
Joined
Dec 21, 2011
Messages
95
Re: Expanding ZPool, but getting error message "you are trying to add a virtual dev..

Yea, true true. I guess my worry is more in the fact that my harddrives would be working harder if they are full - since data is kind of all over a disk head and using the entire head up, I always hear "don't fill up past 90%" for this reason, or the drives could fail sooner, not sure if it's more myth though.
 
Status
Not open for further replies.
Top