Adding disk to RAID

Status
Not open for further replies.

Endy

Cadet
Joined
Sep 5, 2012
Messages
2
Is there a Raid setup In FreeNAS where you can start with lets say 4 disks and then later add HDD's later without having to back up the data?
Im not good with computer lingo so i give an example instead:

4 x 1TB HDD = one volume total size 4 TB (raid0)
use it a few weeks, where I put some musik and movie ect. on it
then I add another drive
5 x 1TB HDD = total size 5 TB(still raid0)
the media I put on the 4 disks still is in this new setup.

I plan on using raid 5 or somthing like it because i would like to have at least some redundancy.

BTW its a Home NAS with nothing vital on it so i don't want to lose more that one drive to redundancy.

** Edit **
Never mind from what i have read it should be possible.
 

Stephens

Patron
Joined
Jun 19, 2012
Messages
496
I'd like to know where you read that you can expand a FreeNAS RAID-Z1 (RAID5) array by one disk. You can't.
 

Endy

Cadet
Joined
Sep 5, 2012
Messages
2
well I dont know about RAID-z1 and the specifics but I read about Online Capacity Expansion and if FreeNAS dosn't support it i'll find an OS that does. also I don't know if Online Capacity Expansion is a hardware only(not all controllers) or if it is in software raid to.

My point being. It is possible to expand one drive at a time and it is also possible to do Online RAID Level Migration, so I can start with a low number of drive and expand when i have the green to do so:)
 

ben

FreeNAS GUI Developer
Joined
May 24, 2011
Messages
373
The answer is no. You can stripe additional RAID groups together live, but you can't add more disks to an existing RAID-Z* pool. For example, if you have a 6-drive RAID-Z2 and you want to add four more drives to it (maintaining the same number of parity disks) you can't - you can instead get two more disks and create a second 6-drive RAID-Z2 group and stripe them together, which will cause you to expend another two disks on parity. At this point the two would be permanently bound (ie failure or detachment of one kills all data). You also cannot upgrade a RAID-Z to a RAID-Z2.
 

toddos

Contributor
Joined
Aug 18, 2012
Messages
178
ZFS raid doesn't work that way, and you're unlikely to find that kind of functionality outside of enterprise-grade hardware.

What you can do with ZFS is replace each disk individually with a larger capacity disk and when you've replaced them all you get to use the free space. Like if you initially setup a 4x1TB RAID-Z1 for 3TB usable space, you can replace each of those 1TB with 3TB drives and end up with 9TB usable space once they're all replaced. You can expand your zpool with multiple zdevs, but you can't increase the number of drives in a zdev over time. For example, if you set up a zpool with 4x1TB RAID-Z1 (that's a zdev), you can set up a second 4x3TB RAID-Z1 (that's a second zdev) and add it to your first pool for a total of 12TB usable space.

There's no mechanism for online level migration in zfs with the exception of converting striped to mirrored (that just adds redundancy, not capacity).
 

peterh

Patron
Joined
Oct 19, 2011
Messages
315
Is there a Raid setup In FreeNAS where you can start with lets say 4 disks and then later add HDD's later without having to back up the data?
Im not good with computer lingo so i give an example instead:

4 x 1TB HDD = one volume total size 4 TB (raid0)
use it a few weeks, where I put some musik and movie ect. on it
then I add another drive
5 x 1TB HDD = total size 5 TB(still raid0)
the media I put on the 4 disks still is in this new setup.

I plan on using raid 5 or somthing like it because i would like to have at least some redundancy.

BTW its a Home NAS with nothing vital on it so i don't want to lose more that one drive to redundancy.

** Edit **
Never mind from what i have read it should be possible.

Yes it's perfectly doable.

I'll quote wikipedia "zfs" :
<quote>
Each vdev can be viewed as a group of hard disks (or partitions, or files, etc.). Each vdev should have redundancy because if a vdev is lost, then the whole zpool is lost. Thus, each vdev should be configured as RAID-Z1, RAID-Z2, mirror, etc. It is not possible to change the number of drives in an existing vdev (Block Pointer Rewrite will allow this, and also allow defragmentation), but it is always possible to increase storage capacity by adding a new vdev to a zpool. It is possible to swap a drive to a larger drive and resilver (repair) the zpool. If this procedure is repeated for every disk in a vdev, then the zpool will grow in capacity when the last drive is resilvered. A vdev will have the same capacity as the smallest drive in the group. For instance, a vdev consisting of three 500 GB and one 700 GB drive, will have a capacity of 4 x 500 GB.
</quote> ( http://en.wikipedia.org/wiki/ZFS )

It's also described (tersly) in the manpagees.
 

ben

FreeNAS GUI Developer
Joined
May 24, 2011
Messages
373
@peterh you're describing what toddos did, growth by increasing disk size, not what OP asked for, which is growth by adding disks to vdevs. The "block pointer rewrite" functionality is not in ZFS even at Oracle, and will probably never be open-sourced by them even when it is. The answer remains no.
 

peterh

Patron
Joined
Oct 19, 2011
Messages
315
I'll extract a small portion of the above :

but it is always possible to increase storage capacity by adding a new vdev to a zpool

Is that enought to convince You ? Or do you want more texts that describes what's
possible ( and what i actually have done ? )
 

ben

FreeNAS GUI Developer
Joined
May 24, 2011
Messages
373
Yes. A new vdev. Of a single disk, with no parity protection, that acts as a single point of failure for the whole pool. You can do that... and may god have mercy on your data.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You need to read my guide in my sig. It'll explain it. :)
 

Richman

Patron
Joined
Dec 12, 2013
Messages
233
This was the exact question I had, but now that its answered .... it begs another or more questions. It this a BSD limitation or a ZFS limitation? The reason I ask is that from my understanding, drobo NAS appliances and Synology NAS appliances and maybe even ReadyNAS allow you to add a disk to a storage pool without rebuilding. I also read on a website where someone used Debian as the front end for their NAS and added disks and migrated from a RAID 1 mirror to RAID 5 without a rebuild. If you want the website I will dig it up on request.
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
It's a ZFS restriction.
 

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
This was the exact question I had, but now that its answered .... it begs another or more questions. It this a BSD limitation or a ZFS limitation? The reason I ask is that from my understanding, drobo NAS appliances and Synology NAS appliances and maybe even ReadyNAS allow you to add a disk to a storage pool without rebuilding. I also read on a website where someone used Debian as the front end for their NAS and added disks and migrated from a RAID 1 mirror to RAID 5 without a rebuild. If you want the website I will dig it up on request.
It is how ZFS works. You can add disks to a pool to expand it, but it is a bit more complicated than plugging in a single disk (you need to add a new, preferably redundant, vdev). Please read cyberjock's guide (you can find it in his signature just above your post). It nicely explains everything.
 
Status
Not open for further replies.
Top