Date: Tue, 23 Sep 2014 08:51:25 -0700 (PDT) From: Beeblebrox <zaphod@berentweb.com> To: freebsd-questions@freebsd.org Subject: Re: Gpart: Adding mirror to existing zpool Message-ID: <20140923185109.4b9f2ff6@rsbsd.rsb> In-Reply-To: <alpine.BSF.2.11.1409230920450.71831@wonkity.com> References: <1411478977772-5951380.post@n5.nabble.com> <alpine.BSF.2.11.1409230920450.71831@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Warren. Currently my partition setup (excluding ada0). 4k alligned as you can see: => 34 976773101 ada1 GPT (466G) 34 6 - free - (3.0K) 40 8388608 1 freebsd-swap (4.0G) 8388648 159383552 3 freebsd-zfs (76G) 167772200 809000928 2 freebsd-zfs (386G) 976773128 7 - free - (3.5K) => 40 1953525088 ada2 GPT (932G) 40 12582912 1 freebsd-swap (6.0G) 12582952 209715200 3 freebsd-zfs (100G) 222298152 1731226976 - free - (826G) * ada1p3 and ada2p3 are the same pool as simple jbod (non-issue) * ada2p2 is what I want to mirror on ada2p2 # gpart show -pr ada1 => 167772200 809000928 ada1p2 (386G) 809000928 - 167772200 = 641228728 # gpart add -a 4k -s 641228728 -i 2 ada2 # gpart show ada2 => 2 freebsd-zfs ada2p2 (376G) = 10G less than ada1p2 ----- FreeBSD-11-current_amd64_root-on-zfs_RadeonKMS -- View this message in context: http://freebsd.1045724.n5.nabble.com/Gpart-Adding-mirror-to-existing-zpool-tp5951380p5951431.html Sent from the freebsd-questions mailing list archive at Nabble.com. From owner-freebsd-questions@FreeBSD.ORG Tue Sep 23 18:14:47 2014 Return-Path: <owner-freebsd-questions@FreeBSD.ORG> Delivered-To: freebsd-questions@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 D60EA3F5 for <freebsd-questions@freebsd.org>; Tue, 23 Sep 2014 18:14:47 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7B2302A9 for <freebsd-questions@freebsd.org>; Tue, 23 Sep 2014 18:14:47 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id s8NIEiST023085 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 23 Sep 2014 12:14:44 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id s8NIEiWO023082; Tue, 23 Sep 2014 12:14:44 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Tue, 23 Sep 2014 12:14:44 -0600 (MDT) From: Warren Block <wblock@wonkity.com> To: Beeblebrox <zaphod@berentweb.com> Subject: Re: Gpart: Adding mirror to existing zpool In-Reply-To: <20140923185109.4b9f2ff6@rsbsd.rsb> Message-ID: <alpine.BSF.2.11.1409231208170.20207@wonkity.com> References: <1411478977772-5951380.post@n5.nabble.com> <alpine.BSF.2.11.1409230920450.71831@wonkity.com> <20140923185109.4b9f2ff6@rsbsd.rsb> User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Tue, 23 Sep 2014 12:14:44 -0600 (MDT) Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Tue, 23 Sep 2014 18:14:47 -0000 On Tue, 23 Sep 2014, Beeblebrox wrote: > Hi, Warren. > > Currently my partition setup (excluding ada0). 4k alligned as you can see: > => 34 976773101 ada1 GPT (466G) > 34 6 - free - (3.0K) > 40 8388608 1 freebsd-swap (4.0G) > 8388648 159383552 3 freebsd-zfs (76G) > 167772200 809000928 2 freebsd-zfs (386G) > 976773128 7 - free - (3.5K) > => 40 1953525088 ada2 GPT (932G) > 40 12582912 1 freebsd-swap (6.0G) > 12582952 209715200 3 freebsd-zfs (100G) > 222298152 1731226976 - free - (826G) > > * ada1p3 and ada2p3 are the same pool as simple jbod (non-issue) > * ada2p2 is what I want to mirror on ada2p2 > # gpart show -pr ada1 => 167772200 809000928 ada1p2 (386G) > 809000928 - 167772200 = 641228728 > # gpart add -a 4k -s 641228728 -i 2 ada2 > # gpart show ada2 => 2 freebsd-zfs ada2p2 (376G) = 10G less than ada1p2 The first column is the starting block, the second column is the size, so it is not necessary to do the math. Just create a partition the same size in the free space on ada2. It does not need to start at the same location as the other partition on ada1, but it should be aligned to 4K for performance: gpart add -t freebsd-zfs -a4k -s 159383552 -i2 ada2
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140923185109.4b9f2ff6>