Storage expansion on FreeNAS

Status
Not open for further replies.

gkroezinga

Dabbler
Joined
Sep 1, 2014
Messages
22
Hello.

From what I have read in the powerpoint presentation written by cyberjock, it should be possible to expand a 5disk raidz with a 4disk raidz.
FreeNAS, however, won't let me do it.
It refuses with the following error:
  • You are trying to add a virtual device consisting of 4 device(s) in a pool that has a virtual device consisted of 5 device(s)
The guide states:

  • ¨More hard disks can be added to a zpool by adding another VDev.
  • ¨The new VDev can use a different size hard drive and even a different number of hard drives than the old VDev. It is recommended that they have the same number of disks though.
  • ¨The new VDev does not have to have the same characteristics(mirror,Z1,Z2, etc.), however it is highly recommended.
  • ¨VDevs cannot be removed from a zpool after they have been added, even if you “just” added it on accident. You should be absolutely 100% sure you are doing what you want to do before adding VDevs. If you aren’t sure, test it in a VM to be sure you understand what you are doing. There is no undo!

Am I doing something that is impossible?

I hope you can help,
With kind regards,
Geert
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
This should be possible. What version of FreeNAS are you running, what are your hardware specs, and how, exactly, are you trying to expand the volume?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
The ZFS Volume Manager won't let you do things that "might be stupid". In your case you will have to use the Legacy Volume Manager to expand your pool. Simple enough to do though.. just click the "Manual Setup" button after you click on the ZFS Volume Manager button. Select the pool to expand and select all the disks you want in the vdev (in your case it is probably all of the disks). Make sure dedup is off and ZFS Extras are set as appropriate (my guess is everything is None since you aren't adding a ZIL, L2ARC or spare disks and click add volume.

If you aren't confident in doing this, test it in a VM to be sure you are comfortable. The last thing you want to do is add something in a different way than you intend. ;)
 

gkroezinga

Dabbler
Joined
Sep 1, 2014
Messages
22
Everything is backed up, its not a production machine
Thanks for the help, I will try!
 

enjoywithme

Dabbler
Joined
Dec 23, 2014
Messages
13
I have a raidz2 zpool with 6 disks (5 * 2T + 1* 4T). I just replaced a 2T disk with a new 4T disk because of unrecoverable sectors.
As the document "http://doc.freenas.org/9.3/freenas_storage.html#enabling-zfs-pool-expansion" said, I set "autoexpand=on".
After the replacement and also resilver completed, it seems the ZFS does not use the whole space of the zpool:
zpool.png

The root dataset "zfs_vol" is only up to around 7T (used space 1.2T plus 5.8T). But the whole space of zpool "zfs_vol" is 10T. Where is the missing 3T?
This is the output of "zpool list":
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
freenas-boot 55.5G 1.83G 53.7G - - 3% 1.00x ONLINE -
zfs_vol 10.9T 1.76T 9.12T - 5% 16% 1.00x ONLINE /mnt

I also tried "zpool export zfs_vol" and then import back with "zpool import -R /mnt zfs_vol". But nothing changed.

Tnanks cyberjock for helping me a lot in another post. Wish get your answer once more.
 
Last edited:

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
I have a raidz2 zpool with 6 disks (5 * 2T + 1* 4T). I just replaced a 2T disk with a new 4T disk because of unrecoverable sectors.
As the document "http://doc.freenas.org/9.3/freenas_storage.html#enabling-zfs-pool-expansion" said, I set "autoexpand=on".
After the replacement and also resilver completed, it seems the ZFS does not use the whole space of the zpool:
View attachment 6202
The root dataset "zfs_vol" is only 5.8T, which means used space (1.2T) plus 2.5T only up to around 7T. Where is the missing 2T?
This is the output of "zpool list":
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
freenas-boot 55.5G 1.83G 53.7G - - 3% 1.00x ONLINE -
zfs_vol 10.9T 1.76T 9.12T - 5% 16% 1.00x ONLINE /mnt

I also tried "zpool export zfs_vol" and then import back with "zpool import -R /mnt zfs_vol". But nothing changed.

Tnanks cyberjock for helping me a lot in another post. Wish get your answer once more.
You need to replace all the disks with a 4T if you want to use the extra space. ZFS only uses the largest common size across all drives.

So you could have 4 500G drives and a 6T drive and ZFS will only use 500G of the 6T drive until every drive in the pool is a 6T.
 
Status
Not open for further replies.
Top