From owner-freebsd-stable@FreeBSD.ORG Thu Mar 15 14:21:19 2012 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 309201065670 for ; Thu, 15 Mar 2012 14:21:19 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) by mx1.freebsd.org (Postfix) with ESMTP id 935A88FC0A for ; Thu, 15 Mar 2012 14:21:16 +0000 (UTC) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.14.5/8.14.5) with ESMTP id q2FELAKE010575 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Mar 2012 15:21:10 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.14.5/8.14.5/Submit) with ESMTP id q2FELAFH010572; Thu, 15 Mar 2012 15:21:10 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Thu, 15 Mar 2012 15:21:10 +0100 (CET) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: George Mamalakis In-Reply-To: <4F61EEE1.1030909@eng.auth.gr> Message-ID: References: <4F61D9F0.6000005@eng.auth.gr> <4F61EEE1.1030909@eng.auth.gr> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) Organization: Fagskolen Innlandet OpenPGP: url=http://fig.ol.no/~trond/trond.key MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="2055831798-1492771317-1331821270=:67839" X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.fig.ol.no Cc: stable@freebsd.org Subject: Re: grow zpool on a mirror setup X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Mar 2012 14:21:19 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --2055831798-1492771317-1331821270=:67839 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT On Thu, 15 Mar 2012 15:30+0200, George Mamalakis wrote: > Trond, > > thank you for your reply. Now to my questions: > > On 03/15/12 14:45, Trond Endrestøl wrote: > > On Thu, 15 Mar 2012 14:00+0200, George Mamalakis wrote: > > > > > "I am experimenting with one installation of FreeBSD-9-STABLE/amd64 on a > > > VirtualBox that is using gptzfsboot on a raid-1 (mirrored) zfs pool. My > > > problem is that I need to grow the filesystem size of zfs partitions. I > > > followed this guide > > > (http://support.freenas.org/ticket/342), > > > which is for FreeNAS, and encountered a few problems. > > > > > > # gpart show > > > => 34 40959933 ada0 GPT (19G) > > > 34 128 1 freebsd-boot (64k) > > > 162 35651584 2 freebsd-zfs (17G) > > > 35651746 5308221 3 freebsd-swap (2.5G) > > > > > > => 34 40959933 ada1 GPT (19G) > > > 34 128 1 freebsd-boot (64k) > > > 162 35651584 2 freebsd-zfs (17G) > > > 35651746 5308221 3 freebsd-swap (2.5G) > > There's one mistake I'd point out. Your ZFS partitions are followed by > > your swap partitions. It would be a lot easier if the ZFS partitions > > were the last one on each drive. > > Why is this a mistake? Shouldn't ZFS grow up to the size of its underlying > partition, regardless of its position? Is this restriction documented > somewhere? I was under the impression that the above was the original GPT layout and partition sizes. Clearly it's not. And yes, you are correct about the independency of a partition's position. As for growing a zpool, I haven't attempted that at all. I'll give it a try later today. > > Since your are using VirtualBox, I would simply create a new pair of > > virtual drives with the desired sizes and attach these to your VM. > > Next, create new boot, swap, and ZFS partitions, in this particular > > order, on the new drives. Create a ZFS pool using the new ZFS > > partitions on the new drives, and transfer the old system from the old > > drives to the new drives, using a recursive snapshot and the zfs > > send/receive commands. Remember to set the bootfs property on the > > newly created ZFS pool prior to reboot. > > I understand that there are quite a few alternatives on how I could migrate my > system to one with larger disks, but I hoped that the method that was supposed > to work with zpool and gpart, would have worked indeed (It was the simple, and > required less space than the one that you propose). > > Thanks again for your answer! NP. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrestøl, | Trond Endrestøl, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gjøvik Technical College, Norway, | | tlf. dir. 61 14 54 39, | Office.....: +47 61 14 54 39, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+ --2055831798-1492771317-1331821270=:67839--