Upgrading RAIDZ-2

Status
Not open for further replies.

Shroom

Explorer
Joined
Mar 19, 2014
Messages
66
Hello guys!

Short time lurker here, just recently became interested in building my own NAS and want to do it right so I've been scouring these forums like crazy lately. I've found lots of useful information and answers to most of my questions, but I still haven't found a definitive answer to how many hard drives is the minimum to start with.

My situation is this: I want to build a mini-ITX Pentium G3220-based NAS starting with as few drives as possible so that I can afford all the major equipment and add drives in the coming months.

I could set up 3 drives in a 2+1 RAIDZ-1 setup, but I'd be limited to only one parity drive and as far as I've read, it's impossible to upgrade a RAIDZ-1 zpool to a RAIDZ-2 with additional drives.

Would it be practical to start with 2+2 drives in RAIDZ-2, and add up to 2 more drives later on? Is adding drives this easy, or is an entire ZFS rebuild required?
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
Rebuild is required for adding in the drives.. 4 drives minimum for raidz2.. I'm not sure on your requirements.. Mini-ITX case would probably limit your ability to expand by adding more drives? You could buy bigger drives eventually and expand the pool drive by drive by resilvering until every disk is complete..
 

Shroom

Explorer
Joined
Mar 19, 2014
Messages
66
The Lian Li PC-Q25 is perfect for my situation. 5 hotswap internal HDD bays, with room to add 2 more 3.5" as well as 2 or more 2.5" drives.

So I could upgrade from 4 drives in 2+2 to 6 drives in 4+2 at some point in the future and migrate the zpool during rebuild with no loss of data?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
The Lian Li PC-Q25 is perfect for my situation. 5 hotswap internal HDD bays, with room to add 2 more 3.5" as well as 2 or more 2.5" drives.

So I could upgrade from 4 drives in 2+2 to 6 drives in 4+2 at some point in the future and migrate the zpool during rebuild with no loss of data?
Nope, you will loose data if you don't pull it off first. You cannot just add drives without a serious risk. The risk being if you were to "extend" the pool with two more drives, if ether of those drives fail, the entire pool is gone.
 

Shroom

Explorer
Joined
Mar 19, 2014
Messages
66
Nope, you will loose data if you don't pull it off first. You cannot just add drives without a serious risk. The risk being if you were to "extend" the pool with two more drives, if ether of those drives fail, the entire pool is gone.

Can I extend the pool to one drive at a time, thus decreasing the risk of losing the pool? Is this risk only present during the extension process?

I intend to thoroughly test every drive I receive before adding it to the pool so ensure no hiccups occur.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437

Shroom

Explorer
Joined
Mar 19, 2014
Messages
66
http://doc.freenas.org/index.php/Volumes#Replacing_Drives_to_Grow_a_ZFS_Pool This is in the docs ;) Just keep a copy or two of the data just in case the process fails etc..

Excellent, thank you.

Although keeping a backup copy of the data wouldn't be practical... the NAS is being set up as my main storage unit, it will contain all archives, media files, data, backups... nowhere else to put all that stuff while messing with the pool. But according to that guide I should be okay if I pre-plan the pool for 6 drives and just start with 4, I think.
 

Yatti420

Wizard
Joined
Aug 12, 2012
Messages
1,437
If you wanted to run a second pool maybe with the 2 other drives mirrored.. with the other four in raid-z2..
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994

Shroom

Explorer
Joined
Mar 19, 2014
Messages
66
If you wanted to run a second pool maybe with the 2 other drives mirrored.. with the other four in raid-z2..

I don't think that would really be optimal, I just want one storage pool.

Yea, the starting with 4 drives and adding 2 later is going to hurt you. Don't say you were not warned.
Here is a link to some valuable reading...
http://forums.freenas.org/index.php...ning-vdev-zpool-zil-and-l2arc-for-noobs.7775/

Thanks. This is exactly the information I was looking for.

Guess I should just wait until I can afford all 6 drives at once and start it off with RAIDZ-2.

I wanted to start with as few HDDs as possible to save on cost, and since I don't need all that much storage starting out I just figured I could add 2 drives and expand the pool to those drives somehow without losing data. This seems to be possible, just not practical or safe, am I correct in this assumption?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
You should purchase a few hard drives and play around with it, get use to how it works. It's much better to do that now before you put all your data on it and find out you want to make a change. Not many of us can afford all the drives we wanted at once.
 

Shroom

Explorer
Joined
Mar 19, 2014
Messages
66
You should purchase a few hard drives and play around with it, get use to how it works. It's much better to do that now before you put all your data on it and find out you want to make a change. Not many of us can afford all the drives we wanted at once.

This is an excellent suggestion. I think I may do just that.
 

gpsguy

Active Member
Joined
Jan 22, 2012
Messages
4,472
Do you have any spare drives lying around? For example, if you're planning to planning to buy 4 - 4Tb drives and had 2 - 1Tb drives laying around, you could combine them to build your 6 drive RAIDz2 volume. Since the volume would be limited by the size of the smaller drives, you'd only get ~3.5Gb of usable storage.

But, once you were able to upgrade/replace the two smaller drives (one at a time), the volume would automatically expand.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
But, once you were able to upgrade/replace the two smaller drives (one at a time), the volume would automatically expand.
This is also an excellent idea, wish I had come up with it.;)
 

Shroom

Explorer
Joined
Mar 19, 2014
Messages
66
Do you have any spare drives lying around? For example, if you're planning to planning to buy 4 - 4Tb drives and had 2 - 1Tb drives laying around, you could combine them to build your 6 drive RAIDz2 volume. Since the volume would be limited by the size of the smaller drives, you'd only get ~3.5Gb of usable storage.

But, once you were able to upgrade/replace the two smaller drives (one at a time), the volume would automatically expand.

Hmmm... very interesting suggestion. I planned to buy at least 4 x 3TB REDs and add 2 later... could those 2 be forgone for 2 of my 1TB Caviar Blacks from my current RAID 5 setup? And then expand when I have 2 more 3TB drives?

The only problem is all my data is currently be kept on this RAID5 setup.. so I couldn't repurpose the harddrives until I had somewhere else to drop the data. Still a really interesting suggestion though, thanks.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Hmmm... very interesting suggestion. I planned to buy at least 4 x 3TB REDs and add 2 later... could those 2 be forgone for 2 of my 1TB Caviar Blacks from my current RAID 5 setup? And then expand when I have 2 more 3TB drives?

The only problem is all my data is currently be kept on this RAID5 setup.. so I couldn't repurpose the harddrives until I had somewhere else to drop the data. Still a really interesting suggestion though, thanks.

Yes. Read my noobie guide.. it explains how to expand pools in the various ways...
 

panz

Guru
Joined
May 24, 2013
Messages
556
I doubt I always had is: what happens when I add a VDev to an existing pool?

E.g. adding a RAIDZ2 VDev (6 disks of the same capacity) to an existing RAIDZ2 pool (built of 6 disks of the same capacity too). This is going to double the available storage space, but: how does ZFS deal with the fact that all the data are on the first 6 disks? Is it going to feed the new VDev with the existent data?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
It uses an intelligent algorithm to determine where new data gets.. not surprisingly at first it will store alot of data in the new vdev since it's empty. No, you shouldn't think about trying to redistribute the data.. it doesn't matter enough to make it worth your time or effort.
 

Shroom

Explorer
Joined
Mar 19, 2014
Messages
66
Yes. Read my noobie guide.. it explains how to expand pools in the various ways...

I actually already had it downloaded yesterday. Found it on another thread :p

Thanks!! This guide is exactly what I was looking for going for a NAS build with no prior experience.
 
Status
Not open for further replies.
Top