Exanding zpool help

Discussion in 'FreeBSD and FreeNAS' started by vegaman, Apr 15, 2015.

  1. vegaman

    vegaman Member

    Sep 12, 2013
    Likes Received:

    I'm running low on space and have started to upgrade to 4TB drives, but I'm not sure if ZFS will work the way I want here. I know I can expand a zpool by replacing the drives with larger ones, but my zpool is 2 6 drive RAIDZ2 vdevs. Can I expand just one of the vdevs? Or do I have to replace all the drives in the zpool?

    Here's a zpool status (resilvering at the moment because I replaced one of the drives before thinking of this):
      pool: sprite
     state: DEGRADED
    status: One or more devices is currently being resilvered.  The pool will
      continue to function, possibly in a degraded state.
    action: Wait for the resilver to complete.
      scan: resilver in progress since Wed Apr 15 22:21:39 2015
      441G scanned out of 8.77T at 566M/s, 4h17m to go
      27.3G resilvered, 4.91% done
      sprite  DEGRADED  0  0  0
      raidz2-0  DEGRADED  0  0  0
      gptid/b9c9d2b2-e1d0-11e4-bc17-0025908680ce  ONLINE  0  0  0
      gptid/fd97f39c-e243-11e4-bc17-0025908680ce  ONLINE  0  0  0
      gptid/3c12d182-e258-11e3-80d4-0025908680ce  ONLINE  0  0  0
      gptid/3e01f46f-e258-11e3-80d4-0025908680ce  ONLINE  0  0  0
      gptid/7ab74a98-e287-11e4-bc17-0025908680ce  ONLINE  0  0  0
      replacing-5  REMOVED  0  0  0
      10960347024451614254  REMOVED  0  0  0  was /dev/gptid/4207e711-e258-11e3-80d4-0025908680ce
      gptid/33c30984-e359-11e4-bc17-0025908680ce  ONLINE  0  0  0  (resilvering)
      raidz2-1  ONLINE  0  0  0
      gptid/bedac0a1-e258-11e3-80d4-0025908680ce  ONLINE  0  0  0
      gptid/bf311930-e258-11e3-80d4-0025908680ce  ONLINE  0  0  0
      gptid/bf8f918e-e258-11e3-80d4-0025908680ce  ONLINE  0  0  0
      gptid/bfe5eb1e-e258-11e3-80d4-0025908680ce  ONLINE  0  0  0
      gptid/c0424e65-e258-11e3-80d4-0025908680ce  ONLINE  0  0  0
      gptid/c09c366d-e258-11e3-80d4-0025908680ce  ONLINE  0  0  0
    errors: No known data errors
  2. spazoid

    spazoid Member

    Apr 26, 2011
    Likes Received:
    You can expand one vdev at a time.
    vegaman likes this.
  3. 5teve

    5teve Active Member

    Jan 23, 2015
    Likes Received:
    I'm just doing the same with my freenas box, offline a drive and remove - replace - wait for it to resilver - repeat. I'm a complete novice at this.. so take my advice with a pinch of salt..

    In freenas (i assume freebsd too, but i've only ever toyed with freenas) you can turn auto expand on, although I think it defaults to on for everything but the boot pool in freenas.

    zpool get all <pool> | grep autoexpand
    turn it on
    zpool set autoexpand=on <pool>
    In theory after the last disk is inserted it should expand to fill the empty space.

    If auto expand is off and you have already replaced the disks I have just used.. (for a mirror though)

    #zpool offline <pool> <device>
    #zpool online -e <pool> <device>

    for each drive and it will expand them

  4. toomuchstuff

    toomuchstuff Member

    Nov 4, 2013
    Likes Received:
    As a note, if you have an extra drive bay zpool replace would be the way to go.
    20.3. zpool Administration

    Make sure you set autoexpand on for the pool like previously stated, but use the zpool replace command to swap online drives.
    I have done this with several pools and rolling back from a failed replacement was painless.
Similar Threads: Exanding zpool
Forum Title Date
FreeBSD and FreeNAS zpool not degraded, but certain files cause transfers to hang May 16, 2018
FreeBSD and FreeNAS FreeNAS server...will this hardware suffice? Multiple zpools? Feb 21, 2017
FreeBSD and FreeNAS ZFS storage space maximization in large zpools May 24, 2015
FreeBSD and FreeNAS camcontrol device spindown/spinup scripts for zpools Jan 6, 2011

Share This Page