From owner-freebsd-fs@FreeBSD.ORG Mon Mar 17 11:00:47 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C4E14A2; Mon, 17 Mar 2014 11:00:47 +0000 (UTC) Received: from mail-vc0-x22b.google.com (mail-vc0-x22b.google.com [IPv6:2607:f8b0:400c:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CC5F517A; Mon, 17 Mar 2014 11:00:46 +0000 (UTC) Received: by mail-vc0-f171.google.com with SMTP id lg15so5659808vcb.30 for ; Mon, 17 Mar 2014 04:00:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=3D6ndFKfkC+LePBJDZgs0pez/fTP8LtCJrr6lpjMmiI=; b=uAZwbpxk48tlJbT9/ugtqk0JSnRpNJvotLH92nq2gsufgOr3HtKXd7We8e/+InMt2z pxTxkVxbFtEW5br5tKxjLgtaNtsqRqQ77miUhyE/K0/qFwou1PpaCyiSmTOggwVQ6Qd4 T5PJJY1gG2AbgddDuSoeo6Dq9Q/RIcqLVZXv/qbNsS9rirtdWlqQ/13zUaFarsu9pdDz RrnxpTmanrayC4gI82x/cny9dPIcxvSwKBjvRuO7GEj18cC0n3I+GOWHhg4GEMZuWc1N e68t8DMxtV2RNeftQ2jKjz7GkJqLN6CahFA7pT2oeylWZFR31A+DFCcYvTd4WhI/3zRE 0Iuw== X-Received: by 10.58.31.136 with SMTP id a8mr5999349vei.20.1395054045112; Mon, 17 Mar 2014 04:00:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.91.74 with HTTP; Mon, 17 Mar 2014 04:00:25 -0700 (PDT) In-Reply-To: <5326D468.9060909@netlabs.org> References: <5326B36B.2090601@netlabs.org> <159E2EDC-C49D-4982-BB65-F757D949B5FE@FreeBSD.org> <5326D468.9060909@netlabs.org> From: Anton Sayetsky Date: Mon, 17 Mar 2014 13:00:25 +0200 Message-ID: Subject: Re: Growing a ZFS volume To: Adrian Gschwend Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-fs X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Mar 2014 11:00:47 -0000 2014-03-17 12:54 GMT+02:00 Adrian Gschwend : > 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