From owner-freebsd-stable@FreeBSD.ORG Thu Mar 15 13:30:59 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 EDD9F106566C for ; Thu, 15 Mar 2012 13:30:59 +0000 (UTC) (envelope-from mamalos@eng.auth.gr) Received: from vergina.eng.auth.gr (vergina.eng.auth.gr [155.207.18.1]) by mx1.freebsd.org (Postfix) with ESMTP id 4D61F8FC14 for ; Thu, 15 Mar 2012 13:30:58 +0000 (UTC) Received: from mamalacation.ee.auth.gr (mamalacation.ee.auth.gr [155.207.33.29]) (authenticated bits=0) by vergina.eng.auth.gr (8.14.4/8.14.3) with ESMTP id q2FDU9ge069955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Mar 2012 15:30:10 +0200 (EET) (envelope-from mamalos@eng.auth.gr) Message-ID: <4F61EEE1.1030909@eng.auth.gr> Date: Thu, 15 Mar 2012 15:30:09 +0200 From: George Mamalakis User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120217 Thunderbird/10.0.2 MIME-Version: 1.0 To: =?UTF-8?B?VHJvbmQgRW5kcmVzdMO4bA==?= References: <4F61D9F0.6000005@eng.auth.gr> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (vergina.eng.auth.gr [192.168.18.7]); Thu, 15 Mar 2012 15:30:10 +0200 (EET) 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 13:31:00 -0000 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? > 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! -- George Mamalakis IT and Security Officer Electrical and Computer Engineer (Aristotle Un. of Thessaloniki), MSc (Imperial College of London) Department of Electrical and Computer Engineering Faculty of Engineering Aristotle University of Thessaloniki phone number : +30 (2310) 994379