# Expanding a raidz vdev in zpool



## cschiewek (Dec 30, 2012)

Hello All,

I have a zpool that consists of 2 raidz vdevs (raidz1-0 and raidz1-1).  The first vdev is 4 1.5TB drives.  The second was 4 500GB drives.  I replaced the 4 500GB drives with 4 3TB drives.  

I replaced one at time, and resilvered each.  Now the process is complete, I expected to have an extra 10TB (4*2.5TB) of raw space, but it's still the same amount of space.  

I did an export and import, which I have read might be required before you'd see the extra space, but that still hasn't happened?

What am I missing?  What can I do to get the extra space?


----------



## xibo (Jan 1, 2013)

I guess you'll have to enable expand on that zpool.

Taken from zpool():

```
The following properties can be set at creation time and import time, and
     later changed with the [b]zpool set[/b] command:

     [b]autoexpand=on[/b] | [b]off[/b]
         Controls automatic pool expansion when the underlying LUN is grown.
         If set to "[b]on[/b]", the pool will be resized according to the size of the
         expanded device. If the device is part of a mirror or raidz then all
         devices within that mirror/raidz group must be expanded before the
         new space is made available to the pool. The default behavior is
         "off".  This property can also be referred to by its shortened column
         name, [b]expand[/b].
```


----------



## usdmatt (Jan 1, 2013)

The following command commonly appears in the forums as a way to force the pool to expand. I think you can even do this with the pool imported but I'm not sure, haven't had a reason to do it yet.


```
zpool online -e pool
```
Or possibly

```
zpool online -e pool device
```


----------



## abhay4589 (Jan 1, 2013)

zfs import export won't do it, 
"zpool online -e pool device" This will surely expand it.
But if you are worried that much about your data then make sure you do some dummy testing before you attempt anything else.


----------



## abhay4589 (Jan 2, 2013)

Check out this thread:
http://forums.freebsd.org/showthread.php?t=28703&highlight=zfs+expand


----------



## cschiewek (Jan 2, 2013)

'zpool online -e' fixed everything.  Thanks all.


----------

