Adding capacity -- Questions before I do

Status
Not open for further replies.

Purged

Cadet
Joined
Apr 14, 2015
Messages
3
Hi All!

Let me start by saying that FreeNAS is proving to be the perfect solution for my needs, and these forums have been fantastic in learning the ropes.

I have read the cyberjock sticky explaining VDevs vs Zpools, etc above, but I want to make sure I do this right.

Here is my situation:

I wanted to test FreeNAS before investing in hard-drives, and although all of my hardware meets the minimum requirements, my storage capacity during my trial run is a single 120GB drive.

Now that I know FreeNAS will suit my needs, I'm ready to increase that storage capacity.

Right now, I can afford 3 WD Red 3TB drives, but my reading tells me that this will not be a good plan as RAIDZ1 is really not sufficient with current drive sizes.

It seems the only real option (since redundancy is important to me) is to get 5 3TB drives, even if it is a bit over budget for RAIDZ2. Is this correct?

Next, now that I've gotten a few jails going, with a couple plugins that suit my needs, I have realized that I would prefer not to just pull that drive and start fresh, but instead copy it to the new Zpool. So, will this be the correct operation to take?:

1) Leave current drive installed.
2) Add the 5 new drives in addition
3) Create new volume (RAIDZ2) with the new 5 drive array
4) Copy data from original volume to new volume
5) Shut down jails/plugins and update them to new location (is this even possible?)
6) Start up jails/plugins
7) Detach original volume
8) Pull original HDD


Now this might me just being OCD/ridiculous, but I'm curious... My original drive is in hotswap bay #1. The new array would use #2-6. After I pull #1, can I just pull #6 and put it in #1's place as to not have an empty first bay?

Lastly, I tried to find and understand this but I simply did not.. If I have 5 drives in RAIDZ2, can I simply add a drive to the VDev later easily to expand the capacity, or do I need an additional 5 to make an additional VDev?

Thanks in advance for your help, and I apologize if this should be more apparent to me, but I'm being cautious to ensure I do it correctly. Thanks again!
 
Last edited:

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
nonononnoonononono.

If you have 3x3TB drives, RAID-Z should be more than sufficient sir.

Don't believe all the press about "RAID-Z is dead". Rumors of its death are highly exagerated.
 

Purged

Cadet
Joined
Apr 14, 2015
Messages
3
Thanks for the response @DrKK If you're right that will save me a good bit of money. What about the other questions I posted above. Do you have any insight/input?

Thanks again.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Well in answer to some of your questions, a vdev, once it is fully capitated, cannot be expanded. (With the exception of adding mirrors---which don't increase capacity---in certain instances). What you can do, at any time, is: Create a new vdev of drive(s) and "stripe that in" to the existing zpool. Of course, in order for that to make sense, you'd probably need another *THREE*, not one, or two, drives.

But a vdev (e.g., in this case you 3x3TB RAID-Z), once created, is more or less fixed in stone like the biblical pillar of salt. You can add NEW vdevs.
 

Purged

Cadet
Joined
Apr 14, 2015
Messages
3
Thanks. I re-reviewed @cyberjock's powerpoint and got it this time.

Hopefully I'm getting terminology correct. From the FreeNAS GUI, is a volume the equivalent of a zpool? What is the equivalent of a vdev?

I'll look for more documentation and continue reading as that seems like a question that has probably been beat to death.

Now, since my initial zpool is a single drive, and I want to replace it with a 3+ drive zpool, I will need to add the 3+ drives to the server, then add all of them to a new volume. I can then copy the contents of the old volume to the new volume, and eliminate the old volume/zpool all together, leaving my new volume/zpool WITH the data from the old one intact. Does that sound right?
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Thanks. I re-reviewed @cyberjock's powerpoint and got it this time.

Hopefully I'm getting terminology correct. From the FreeNAS GUI, is a volume the equivalent of a zpool? What is the equivalent of a vdev?

I'll look for more documentation and continue reading as that seems like a question that has probably been beat to death.

Now, since my initial zpool is a single drive, and I want to replace it with a 3+ drive zpool, I will need to add the 3+ drives to the server, then add all of them to a new volume. I can then copy the contents of the old volume to the new volume, and eliminate the old volume/zpool all together, leaving my new volume/zpool WITH the data from the old one intact. Does that sound right?
Yes, you can do that. Add your 3 new drives later on, make it a brand new pool, then copy the old shit onto the new pool, then remove the original pool from the server, leaving just the new one with the 3 drives.

No problem.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Right now, I can afford 3 WD Red 3TB drives, but my reading tells me that this will not be a good plan as RAIDZ1 is really not sufficient with current drive sizes.

It seems the only real option (since redundancy is important to me) is to get 5 3TB drives, even if it is a bit over budget for RAIDZ2. Is this correct?
If you decide you want to go with RAIDZ2, the minimum number of drives per vdev is 4, not 5. (I think technically you can do RAIDZ2 with 3 drives, it just doesn't make any sense to do so.)
If I have 5 drives in RAIDZ2, can I simply add a drive to the VDev later easily to expand the capacity, or do I need an additional 5 to make an additional VDev?
In addition to what @DrKK has explained, you can also expand storage by replacing each drive in a vdev with a larger drive, one at a time. The procedure is explained in the documentation.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
If you decide you want to go with RAIDZ2, the minimum number of drives per vdev is 4, not 5. (I think technically you can do RAIDZ2 with 3 drives, it just doesn't make any sense to do so.)

Nope, not possible. Not that it matters in practice.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
I was pretty sure I didn't imagine this, so I checked man zpool and it says:
A raidz group with N disks of size X with P parity disks can hold
approximately (N-P)*X bytes and can withstand P device(s) failing
before data integrity is compromised. The minimum number of
devices in a raidz group is one more than the number of parity
disks
. The recommended number is between 3 and 9 to help increase
performance.
So I fired up a VM, attached 4 virtual disks and installed FreeNAS on the first. Sure enough, the GUI won't let you make a RAIDZ2 pool with 3 drives, because it's silly, but zpool will do it at the command-line without any complaint.
RAIDZ2.png
 
Last edited:

jakeandchase

Explorer
Joined
Aug 26, 2014
Messages
53
This thread is just what I needed.

I have 2x3tb drives mirrored and am considering adding another 3tb and going to RaidZ1.

Would copying my data off, starting from scratch and copying it back be the only option?
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
I have 2x3tb drives mirrored and am considering adding another 3tb and going to RaidZ1.

Would copying my data off, starting from scratch and copying it back be the only option?
Yes, you can't convert a vdev from one layout to a different layout.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I was pretty sure I didn't imagine this, so I checked man zpool and it says:

So I fired up a VM, attached 4 virtual disks and installed FreeNAS on the first. Sure enough, the GUI won't let you make a RAIDZ2 pool with 3 drives, because it's silly, but zpool will do it at the command-line without any complaint.
View attachment 7754
Who on earth thought that would be a good idea?
 

Andy Holmes

Dabbler
Joined
May 5, 2015
Messages
16

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Yeah, that's hardly a safe way of doing things.

Of course you can degrade vdevs on purpose and make a new pool, but it's far from being a good idea, especially since you don't really reduce the amount of disks required by that much.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Who on earth thought that would be a good idea?
My guess is that this way was the simplest to engineer, i.e. the number of parity drives is paramount, and the number of data drives just has to be at least one, and forcing it to be more than one would just add complexity to the code for no gain.

EDIT: not that there are literally parity drives and data drives, but you get the point.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You can convert a mirror to raidz under Solaris, and i would imagine it would work under freebsd. I have tested the following procedure and will be using it under freenas when I get my 3rd 4Tb drive. https://blogs.oracle.com/zhangfan/entry/how_to_turn_a_mirror

That's a misnomer. You aren't converting a mirror to RAIDZ with that link. You are simply breaking the mirror you have, creating a new zpool that is RAIDZ (and broken at that), then adding the 3rd disk back to the broken RAIDZ after you've completed moving the data.

This is no different from destroying one pool layout in favor of another. It's not truly "converting" from a mirror to RAIDZ for any definition of "convert".
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Except that it's worse, because the new pool is created at the command-line, which may not play nicely with FreeNAS.

Correct. I was only evaluating the choice of the word "converting" and nothing else.
 
Status
Not open for further replies.
Top