how to expand zpool

Motty Cruz motty.cruz at gmail.com
Tue Feb 28 21:51:43 UTC 2017


Yes I had " zpool set autoexpand=on tank" and yes I have a backup. 

After replacing all the disk: 
$ zpool set autoexpand=on tank
$ zpool replace tank /dev/sdb /dev/sdd # replace sdb with temporary
installed sdd
$ zpool status -v tank # wait for the replacement to be finished
$ zpool replace tank /dev/sdc /dev/sde # replace sdc with temporary
installed sde
$ zpool status -v tank # wait for the replacement to be finished
$ zpool export tank
$ zpool import tank
$ zpool online -e tank /dev/sdd
$ zpool online -e tank /dev/sde
$ zpool export tank
$ zpool import tank

Now it sees all the space!
Thanks, 
Motty

-----Original Message-----
From: Mike Clarke [mailto:jmc-freebsd2 at milibyte.co.uk] 
Sent: Tuesday, February 28, 2017 1:54 AM
Cc: Motty Cruz; freeBSD Mailing List
Subject: Re: how to expand zpool

On Tue, 28 Feb 2017 08:27:10 +0100
Michael Schuster <michaelsprivate at gmail.com> wrote:

> simply put, physically replace one disk, 'zpool replace' it. when 
> that's done, next disk ... This process is very well documented :-)

You need to set autoexpand for the pool to "on" before it can grow to
utilise the extra space.

Also see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216881
there's a bug which causes zpool detach to hang if autoexpand is set to
"on". I don't know if this also affects zpool replace but to be safe leave
autoexpand set to "off" until after you've replaced the last drive.

--
Mike Clarke



More information about the freebsd-questions mailing list