Date: Mon, 17 Mar 2014 13:00:25 +0200 From: Anton Sayetsky <vsjcfm@gmail.com> To: Adrian Gschwend <ml-ktk@netlabs.org> Cc: freebsd-fs <freebsd-fs@freebsd.org> Subject: Re: Growing a ZFS volume Message-ID: <CAFG2KCLBQpmRg-Rvt4M3-DPbuRMbdTrHN67HLixKXJh=%2B4rrgQ@mail.gmail.com> In-Reply-To: <5326D468.9060909@netlabs.org> References: <5326B36B.2090601@netlabs.org> <159E2EDC-C49D-4982-BB65-F757D949B5FE@FreeBSD.org> <CAFG2KCJbn5XVOXY6kaDXJeGAzPFpwv4Bp9VtE9s_2%2BLgqjCkeg@mail.gmail.com> <5326D468.9060909@netlabs.org>
next in thread | previous in thread | raw e-mail | index | archive | help
2014-03-17 12:54 GMT+02:00 Adrian Gschwend <ml-ktk@netlabs.org>: > On 17.03.14 11:48, Anton Sayetsky wrote: > > Hi Anton, > >> autoexpand does not works, same as autoreplace. ;) > > In terms of it does not work in ZFS on FreeBSD? Yep, that's right. Below I prove it: Script started on Sat Mar 8 15:12:40 2014 root@jnb:~# truncate -s 20g /home/jason/test.fil root@jnb:~# mdconfig -a -t vnode -f /home/jason/test.fil md0 root@jnb:~# gpart create -s gpt md0 md0 created root@jnb:~# gpart add -a 4k -t freebsd-zfs -s 10g md0 md0p1 added root@jnb:~# gpart show md0 => 34 41942973 md0 GPT (20G) 34 6 - free - (3.0k) 40 20971520 1 freebsd-zfs (10G) 20971560 20971447 - free - (10G) root@jnb:~# zpool create -o cachefile=none -o autoexpand=on -O canmount=off ztest /dev/md0p1 root@jnb:~# zpool list ztest NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT ztest 9.94G 137K 9.94G 0% 1.00x ONLINE - root@jnb:~# zpool export ztest root@jnb:~# gpart resize -i1 -a 4k -s 15g md0 md0p1 resized root@jnb:~# gpart show md0 => 34 41942973 md0 GPT (20G) 34 6 - free - (3.0k) 40 31457280 1 freebsd-zfs (15G) 31457320 10485687 - free - (5G) root@jnb:~# zpool import -o cachefile=none ztest root@jnb:~# zpool list ztest NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT ztest 9.94G 204K 9.94G 0% 1.00x ONLINE - root@jnb:~# zpool online -e ztest md0p1 root@jnb:~# zpool list ztest NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT ztest 14.9G 208K 14.9G 0% 1.00x ONLINE - root@jnb:~# exit Script done on Sat Mar 8 15:13:52 2014 > > I just expanded it with online -e, worked great. This is the only way to expand pool. You cannot do it automatically on FreeBSD. > > regards > > Adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFG2KCLBQpmRg-Rvt4M3-DPbuRMbdTrHN67HLixKXJh=%2B4rrgQ>