Add additional disk to volume

Discussion in 'Storage' started by Paktas, Jul 11, 2011.

  1. Paktas New Member

    Member Since:
    Jun 19, 2011
    Message Count:
    25
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Vilnius, Lithuania
    Paktas, Jul 11, 2011

    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.
  2. jfr2006 New Member

    Member Since:
    May 27, 2011
    Message Count:
    180
    Likes Received:
    1
    Trophy Points:
    0
    jfr2006, Jul 11, 2011

    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.
  3. Paktas New Member

    Member Since:
    Jun 19, 2011
    Message Count:
    25
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Vilnius, Lithuania
    Paktas, Jul 11, 2011

    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...
  4. jfr2006 New Member

    Member Since:
    May 27, 2011
    Message Count:
    180
    Likes Received:
    1
    Trophy Points:
    0
    jfr2006, Jul 11, 2011

    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 ;)
  5. matthewowen01 New Member

    Member Since:
    May 27, 2011
    Message Count:
    566
    Likes Received:
    3
    Trophy Points:
    0
    matthewowen01, Jul 11, 2011

    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.
  6. Milhouse Super Moderator

    Member Since:
    Jun 1, 2011
    Message Count:
    555
    Likes Received:
    4
    Trophy Points:
    18
    Milhouse, Jul 11, 2011

    @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. :)
  7. matthewowen01 New Member

    Member Since:
    May 27, 2011
    Message Count:
    566
    Likes Received:
    3
    Trophy Points:
    0
    matthewowen01, Jul 12, 2011

    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.
  8. gla New Member

    Member Since:
    Jan 3, 2012
    Message Count:
    2
    Likes Received:
    0
    Trophy Points:
    0
    gla, Jan 3, 2012

    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
  9. warri Active Member

    Member Since:
    Jun 6, 2011
    Message Count:
    922
    Likes Received:
    33
    Trophy Points:
    28
    Location:
    Germany
    warri, Jan 3, 2012

    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.
  10. gla New Member

    Member Since:
    Jan 3, 2012
    Message Count:
    2
    Likes Received:
    0
    Trophy Points:
    0
    gla, Jan 3, 2012

    Yep, that's confirmed by the FAQ:
    One should indeed test the export/import stuff.
  11. Dooldeniya Member

    Member Since:
    Jan 18, 2012
    Message Count:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Austin, TX
    Dooldeniya, Jan 19, 2012

    Wanted to add a good tutorial on zpool CLI options that I came across. Has anyone tried exporting their pool + modify via CLI + GUI import to see if it would work? I will try to set up a VM and test some scenarios this weekend and post results.

    http://southbrain.com/south/tutorials/zfs.html
  12. tobiasgardner New Member

    Member Since:
    Feb 8, 2012
    Message Count:
    1
    Likes Received:
    0
    Trophy Points:
    0
    tobiasgardner, Feb 8, 2012

    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 :)
  13. ProtoSD Active Member

    Member Since:
    Jul 1, 2011
    Message Count:
    3,359
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Feb 9, 2012

    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
  14. Wolfeman0101 Member

    Member Since:
    Jun 14, 2012
    Message Count:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Wolfeman0101, Jun 19, 2012

    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?
  15. ProtoSD Active Member

    Member Since:
    Jul 1, 2011
    Message Count:
    3,359
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Jun 19, 2012

    Yes :)

    Doesn't sound like you're confused ;)
  16. Wolfeman0101 Member

    Member Since:
    Jun 14, 2012
    Message Count:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Wolfeman0101, Jun 19, 2012

    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?
  17. ProtoSD Active Member

    Member Since:
    Jul 1, 2011
    Message Count:
    3,359
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Jun 19, 2012

    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) ;)
  18. Wolfeman0101 Member

    Member Since:
    Jun 14, 2012
    Message Count:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Wolfeman0101, Jul 3, 2012

    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?
  19. ProtoSD Active Member

    Member Since:
    Jul 1, 2011
    Message Count:
    3,359
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Leaving FreeNAS
    ProtoSD, Jul 3, 2012

    Correct

    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.
  20. Wolfeman0101 Member

    Member Since:
    Jun 14, 2012
    Message Count:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Wolfeman0101, Jul 3, 2012

    Thanks for answering my stupid questions.

Share This Page