Problem with growing a raidz2

Status
Not open for further replies.

shaulliv

Cadet
Joined
Jun 5, 2011
Messages
6
Hi, I'm trying to "prototype" an an FreeNAS system on virtual box before I actually make the switch on my production server. One of the things I want to be able to do is expand an raidz2, by replacing smaller drives with bigger ones.
My FreeNAS virtual box setup is an 64 bit VM with 6 GB RAM and 4 8GB virtual drives and an 16GB virtual drive for replacement.
I found this post concerning this issue: http://forums.freenas.org/showthread.php?194-Grow-ZFS-Pool.
One of the posts say:
your other option is to swap out the disks, one by one in the pool. say you have a pool of 4 1TB drives and want to move to 4 2TB drives. use zpool replace <pool> <deviceOld> <deviceNew>, let the pool resilver, then do it for the next and the next until they are all done. then enable auto-resize attribute, export and import the array and you'll have all your new space.
I tried to follow these instructions the best I can but without success.

My pool was named storage.
I did these steps:
1.
Code:
zpool replace storage <old device 1 8GB> <new device 16GB>

after the pool resilvered successfully I did:
2.
Code:
zpool detach storage <old device 1 8GB>

the device detached successfully.
3. I could not find how or where to enable auto resize
4.
Code:
zpool export storage

5.
Code:
zpool import storage


At this point the pool should be bigger but it's not, or at least the GUI doesn't shows it.

Not sure how to proceed.
any help will be appreciated.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi shaulliv -

I think that poster was speaking in general terms about ZFS. I haven't seen anywhere in the GUI to enable 'autoexpand', but you can do if from the command line with 'zpool set autoexpand=on your-pool'

At this point the pool should be bigger but it's not, or at least the GUI doesn't shows it.

I think this is a common misconception with ZFS, your pool won't actually get any larger until you replace ALL of your disks with larger ones, one at a time, and after each one resilvers.

I haven't actually tried the autoexpand command from the command line in this version of ZFS/FreeNAS, so let us know if it actually works (it should).

Hope that helps!
 

Brand

Moderator
Joined
May 27, 2011
Messages
142
I think this is a common misconception with ZFS, your pool won't actually get any larger until you replace ALL of your disks with larger ones, one at a time, and after each one resilvers.

I come from running ZFS on OpenSolaris and am now running it on FreeNAS. I can confirm that if you want to grow the size of a pool you have to replace all drives in the pool, one at a time and wait for it to resliver, before the pool increases in size. This is not a Drobo and does not work like one.
 
Joined
May 27, 2011
Messages
566
sorry i missed a post, autoexpand does not exist for the version of ZFS that FreeNAS uses. sorry for the trouble. i run several systems with zfs and freenas uses the oldest version.
 

dziring

Dabbler
Joined
Aug 17, 2011
Messages
37
What if you initially have drives of different sizes in the pool, and replace smallest drive then? Will you still see no growth until all drives are replaced?
i.e., I have two 1.5 TB drives and two 2.0 TB drives in my pool. If I replace the two 1.5s with 2.0s, will I see growth?
 

Brand

Moderator
Joined
May 27, 2011
Messages
142
What if you initially have drives of different sizes in the pool, and replace smallest drive then? Will you still see no growth until all drives are replaced?
i.e., I have two 1.5 TB drives and two 2.0 TB drives in my pool. If I replace the two 1.5s with 2.0s, will I see growth?

If you replace to the two smaller 1.5TB drives with two 2TB drives for a total of four 2TB drives you would see a growth of 1TB.
 
Joined
May 27, 2011
Messages
566
I come from running ZFS on OpenSolaris and am now running it on FreeNAS. I can confirm that if you want to grow the size of a pool you have to replace all drives in the pool, one at a time and wait for it to resliver, before the pool increases in size. This is not a Drobo and does not work like one.

me too! but FreeNAS uses version 15 and version 15 does not include autoexpand.
 

Stenull

Dabbler
Joined
Aug 22, 2011
Messages
45
shaulliv, have you tried yet?
Does it work or not?

protosd said:
do if from the command line with 'zpool set autoexpand=on your-pool'
matthewowen01 said:
but FreeNAS uses version 15 and version 15 does not include autoexpand.
what is correct? i are confused :confused:
 

shaulliv

Cadet
Joined
Jun 5, 2011
Messages
6
Hi, stunnel
Matthewowen is right there is no autoexpand proprty but it is possible to grow an raidz2.
All you need to do is replace each drive one at a time (wait for the first to resilver then replace the second and wait for it to resilver and repeate with the third etc), when all the drives have been replaced with new ones you need to export the entire array and then important it and the array will be the new size.
 

shaulliv

Cadet
Joined
Jun 5, 2011
Messages
6
Ahhh! Sounds like a tech horror story. But I think it's just beta growing pains and since wer'e at the final release it should be fixed. That being said I haven't tried the same procedure on raidz1. It seems a little pointless to me since raidz1 provided redundency against failure of one drive while raidz2 provided redundency against failure of two drives. so if you want to try this with raidz1 (in a vm and not a production system) we would be interested to know if it works as expected.
 

globus999

Contributor
Joined
Jun 9, 2011
Messages
105
Ahhh! Sounds like a tech horror story. But I think it's just beta growing pains and since wer'e at the final release it should be fixed. That being said I haven't tried the same procedure on raidz1. It seems a little pointless to me since raidz1 provided redundency against failure of one drive while raidz2 provided redundency against failure of two drives. so if you want to try this with raidz1 (in a vm and not a production system) we would be interested to know if it works as expected.

Hi, I tried it with reall HDDz in a real, prod, FN8 using raidz1 and it worked OK.
However, please note that it is as explained. You need to change sufficient hdds for ZFS raidz1 to be able to expand, then let the whole process finish, export and re-import. As I posted before, Exporting and Importing from the GUI *may* work, but be prepared for a fresh install.
 

area51tazz

Cadet
Joined
Aug 30, 2011
Messages
6
I can't even get my Raidz1 array to auto-import in FreeNAS. It shows it to auto-import, but when I select it and hit go, it never shows up. In the console it shows that it's mounted, but it's nowhere to be seen in the GUI.

You mentioned something about a fresh install...if that'd help, I don't mind. I just want to get this working in a VirtualBox before I order all the parts.

Thanks!
 
Status
Not open for further replies.
Top