Add additional disk to volume

Status
Not open for further replies.

Paktas

Dabbler
Joined
Jun 19, 2011
Messages
25
Maybe I am blind, but I can't find any links/icons to adding additional disks to volume. If that is really the case we need to be able to add more disks to volume.
 

jfr2006

Contributor
Joined
May 27, 2011
Messages
174
You can't...current version of ZFS and the version of ZFS supported in freenas does not allow this. You will have to create a new volume.
 

Paktas

Dabbler
Joined
Jun 19, 2011
Messages
25
On wiki it says you can add, but that's most probably for stripe only (which it doesn't say)

Adding to an Existing Volume
ZFS volumes support the addition of disks to an existing zpool. To achieve this in the GUI, go to Storage -> Volumes -> Create Volume. In the "Volume Name" section, input the same name as an existing volume, select the disk(s) you wish to add, and click ZFS. FreeNAS will interpret this configuration as a request to expand the existing ZFS volume.


Even if wiki info is correct - doesn't seem to be the best way of adding additional drives from GUI perspective...
 

jfr2006

Contributor
Joined
May 27, 2011
Messages
174
This will not expand the size of your volume, unless the number of disks and size used to create the new volume is equal to the ones on the existing volume. And even in this situation, you will endup with 2 independent volumes linked like one, that is:

Suppose you have a volume 1, with 3x 2TB in raidz1 mode (total usable space will be 4TB). Now you had 3 new 2TB disks and create a volume with the same name the existing. You will end up with 8TB of disk space, but there will be 2 volumes in you zpool, although you will not notice. If you had started with 6 x 2TB disks and created a new volume, you would get 10TB of usable space. Got the difference?

Believe me..i have passed for all of this, when simulating it on a virtual machine ;)
 
Joined
May 27, 2011
Messages
566
ZFS supports 2 ways of increasing a pools size.

expanding a pool is quite easy as long as you're comfortable with the cli. you need to choose how you want to increase your size. you have 2 options: 1. replace every disk with a larger one, if you started with 500 GB drives and want to move to 2 TB drives. 2. Add a new vdev to your pool with the SAME level of redundancy, if you started with a 6 disk raidz2 and want to add 4 disks in a raidz2.

let me know what you currently have and which way you want to go. I've done them both and they are no more difficult than the other.
 

Milhouse

Guru
Joined
Jun 1, 2011
Messages
564
2. Add a new vdev to your pool with the SAME level of redundancy, if you started with a 6 disk raidz2 and want to add 4 disks in a raidz2.

@matthewowen01: Does it have to be the same level of redundancy? What if you create a volume/zpool with a single RAIDZ vdev consisting of 4 disks, then later you add (as an example) a 2-disk mirror vdev to the same zpool? I think that should work, and ZFS will stripe new data across both the existing RAIDZ vdev and also the new RAID1/mirrored vdev.

@Paktas: You're not blind, but the FreeNAS GUI merges the whole vdev/zpool creation process and retitles it as the "Volume" creation process - as such, it becomes a little confusing how you then create a second vdev to add to an existing zpool but in fact all you do is create a volume using the exact same name as your existing volume (zpool) name, and the new disks will be created in a new vdev (using the redundancy level you choose) then added to your existing zpool. New data will be striped across the original vdev and also the new vdev. Obviously if you were to lose an entire vdev you would lose access to all the data in the zpool, so choose your redundancy levels wisely. :)
 
Joined
May 27, 2011
Messages
566
@matthewowen01: Does it have to be the same level of redundancy? What if you create a volume/zpool with a single RAIDZ vdev consisting of 4 disks, then later you add (as an example) a 2-disk mirror vdev to the same zpool? I think that should work, and ZFS will stripe new data across both the existing RAIDZ vdev and also the new RAID1/mirrored vdev.

yes you can, you can do anything you want, but the powers that be recommend against it. I generally heed those warnings unless I know the underpinnings of the warning. your example would be redundant to 1 disk.

it could vary well be a laziness issue, if the new vdev is not of the same type as the old it complains. it's easier than making sure all mirrors are 3 way when adding to a raidz2.
 

gla

Cadet
Joined
Jan 3, 2012
Messages
2
ZFS supports 2 ways of increasing a pools size.

expanding a pool is quite easy as long as you're comfortable with the cli. you need to choose how you want to increase your size. you have 2 options: 1. replace every disk with a larger one, if you started with 500 GB drives and want to move to 2 TB drives. 2. Add a new vdev to your pool with the SAME level of redundancy, if you started with a 6 disk raidz2 and want to add 4 disks in a raidz2.

let me know what you currently have and which way you want to go. I've done them both and they are no more difficult than the other.
Hi

I am new to all this but I think I got a good grasp on ZFS and FreeNAS after some reading.

I guess what you are mentioning in your second point is a "zpool add pool vdev" command, aren't you? From what I've read, modifying the zpools using CLI causes the internal FreeNAS ZFS database to desynchronize from the actual ZFS zpools configuration and it is NOT recommended since there is no way to resynchronize.

But maybe I'm wrong (actually, I hope to be).

Cheers
Guillaume
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
I guess what you are mentioning in your second point is a "zpool add pool vdev" command, aren't you? From what I've read, modifying the zpools using CLI causes the internal FreeNAS ZFS database to desynchronize from the actual ZFS zpools configuration and it is NOT recommended since there is no way to resynchronize.

But maybe I'm wrong (actually, I hope to be).

I think this is basically correct, but you can try exporting your zpool via the GUI before adding another pool via CLI and auto-import the pool afterwards. That should prevent messing up the database. I'm not sure if that will be working for a zpool with several pools, and if the labels are set correctly, but you could give it a try in a VM.
 

gla

Cadet
Joined
Jan 3, 2012
Messages
2
Yep, that's confirmed by the FAQ:
29) Can I use the Web interface and also use the command line interface to ZFS in FreeNas?

The answer depends on what you do to your ZFS pool.

The GUI interface relies an a small database for its current settings, which resides on your USB drive. Changes to the ZFS file system made in the GUI are written to this database, however the reverse is not true. When you issue commands from the command line, these commands do not update the GUI database. This means that the actual state of ZFS may be different from what the GUI assumes.

An example:
Exporting a pool from the command line, does not mean the GUI knows it has been exported.

One should indeed test the export/import stuff.
 
T

tobiasgardner

Guest
Not sure if this is the place to ask this but...

jfr2006: You mention that the existing version of ZFS in FreeNAS does not support expanding a RAIDZ1 from eg 3 -> 4 disks.
Is that supported in newer versions of ZFS and are there plans to include that version in FreeNAS?

(If I understand correct this functionality exists when using ZFS in Solaris.)

Best regards,
Tobbe, newbie planning to build my first NAS and trying to learn as much as possible :)
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Not sure if this is the place to ask this but...

jfr2006: You mention that the existing version of ZFS in FreeNAS does not support expanding a RAIDZ1 from eg 3 -> 4 disks.
Is that supported in newer versions of ZFS and are there plans to include that version in FreeNAS?

NO, FreeNAS is based on FreeBSD which bases its ZFS on Sun/Oracle's ZFS. This hasn't even been implemented by them yet. At some point WAY down the line when they implement it, FreeBSD will pick it up and FreeNAS will inherit it also. We're realistically probably talking about a couple of years before something like that happens to Sun/Oracle.

This feature was recently discussed in another thread where this blog post from one of the Oracle guys talked about how it *might* be implemented.

http://blogs.oracle.com/ahl/entry/expand_o_matic_raid_z
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
I am planning on building a FreeNAS box and I am still confused about adding drives later.

If I start with (2) 1.5TB and (2) 2TB drives in RAID-Z I will have a 4.5TB ZFS pool correct?

What if later I replace the (2) 1.5TB drives one at a time with (2) 2TB drives? Will I be able to expand to a 6TB Z-pool?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I am planning on building a FreeNAS box and I am still confused about adding drives later.

If I start with (2) 1.5TB and (2) 2TB drives in RAID-Z I will have a 4.5TB ZFS pool correct?

What if later I replace the (2) 1.5TB drives one at a time with (2) 2TB drives? Will I be able to expand to a 6TB Z-pool?

Yes :)

Doesn't sound like you're confused ;)
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Well that is good. Now what if after I have all (4) 2TB drives in RAID-Z I add a PCIe 2.0 x4 SATA card and attach drives to that, can I expand the volume further?

Only by adding another vdev (similar group of disks) to the existing pool or adding separate pool.

(There has GOT TO BE a video or diagram that demonstrates this somewhere! Very few people get the concept) ;)
 

Wolfeman0101

Patron
Joined
Jun 14, 2012
Messages
428
Only by adding another vdev (similar group of disks) to the existing pool or adding separate pool.

(There has GOT TO BE a video or diagram that demonstrates this somewhere! Very few people get the concept) ;)

So I built my FreeNAS box and I'm reading more and more. From this http://doc.freenas.org/index.php/Volumes#Using_Volume_Manager_After_a_Volume_Has_Been_Created and from what you said if I add 2 more drives (start with a 4 drive raid-z 2tb each) those are a seperate vdev but in the same pool? Do they not have redundancy?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
...if I add 2 more drives (start with a 4 drive raid-z 2tb each) those are a seperate vdev but in the same pool?

Correct

Do they not have redundancy?

NO

If you add two single disk vdevs to your existing 4 disk pool you will lose your redundancy. Additional vdevs should have the same configuration as the original vdev in your pool. Since ZFS strips your data across vdevs, if you add single disk vdevs to a pool like you're suggesting, if either of those single disk vdevs fails, it will take out the rest of the pool with it. You could add a mirror to the pool, which would give you some redundancy back, but you should really keep your additional vdevs the same as the original.
 
Status
Not open for further replies.
Top