From owner-freebsd-doc@FreeBSD.ORG Fri Jan 27 10:26:16 2012 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96D22106564A; Fri, 27 Jan 2012 10:26:16 +0000 (UTC) (envelope-from hosting@syscare.sk) Received: from services.syscare.sk (services.syscare.sk [188.40.39.36]) by mx1.freebsd.org (Postfix) with ESMTP id 372F08FC08; Fri, 27 Jan 2012 10:26:15 +0000 (UTC) Received: from services.syscare.sk (services [188.40.39.36]) by services.syscare.sk (Postfix) with ESMTP id 1D705AB37B; Fri, 27 Jan 2012 11:26:15 +0100 (CET) X-Virus-Scanned: amavisd-new at rulez.sk Received: from services.syscare.sk ([188.40.39.36]) by services.syscare.sk (services.rulez.sk [188.40.39.36]) (amavisd-new, port 10024) with ESMTP id GZktlcQhLxuD; Fri, 27 Jan 2012 11:26:12 +0100 (CET) Received: from hosting.syscare.sk (hosting [188.40.39.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by services.syscare.sk (Postfix) with ESMTPS id E0A37AB364; Fri, 27 Jan 2012 11:26:12 +0100 (CET) Received: (from www@localhost) by hosting.syscare.sk (8.14.4/8.14.4/Submit) id q0RAQCsX076840; Fri, 27 Jan 2012 11:26:12 +0100 (CET) (envelope-from hosting@syscare.sk) X-Authentication-Warning: hosting.syscare.sk: www set sender to hosting@syscare.sk using -f To: X-PHP-Originating-Script: 0:func.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 27 Jan 2012 11:26:12 +0100 From: Daniel Gerzo Organization: The FreeBSD Project In-Reply-To: <20120125.111625.2289296443525755896.hrs@allbsd.org> References: <20120125.111625.2289296443525755896.hrs@allbsd.org> Message-ID: <7e043215e6cd0f2da324d6599c921fec@rulez.sk> X-Sender: danger@FreeBSD.org User-Agent: Roundcube Webmail/0.5.4 Cc: pjd@freebsd.org Subject: Re: Handbook RAID1 example X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2012 10:26:16 -0000 On Wed, 25 Jan 2012 11:16:25 +0900 (JST), Hiroki Sato wrote: > wb> Then add a note or warning along the lines of "The procedure > shown can > wb> only be used if the last block of the drive has not been already > wb> allocated to a partition. If the last block has been included in > a > wb> partition, back up, repartion leaving at least one unused block > at the > wb> end of the drive, create the mirror, and restore." > > I think we should rewrite this section not to create a malformed > partition table by configuring gmirror in some way. If all of > partitions are UFS, the following procedure should be safe: > > 1. gmirror label gm0 /dev/da1, and edit /boot/loader.conf to load > the kernel module. > > 2. Reboot and check if gm0 is recognized even after that (just in > case). > > 3. Create partitions in /dev/mirror/gm0 based on ones in /dev/da0. > If capacity of /dev/da0 and /dev/da1 is the same as each other > gm0 should be slightly smaller by the last sector. > > 4. Dump & restore each partition from /dev/da0* to > /dev/mirror/gm0*. > Install a boot block if necessary. > > 5. mount /dev/mirror/gm0s1a /mnt, and edit /mnt/etc/fstab to mount > gm0. Also, apply the same change to /etc/fstab in /dev/da0. > > 6. Reboot and check if gm0 is mounted as the root partition. > > 7. gmirror add gm0 /dev/da0, and wait for the rebuild. > > The primary difference between the above and one in the handbook is > to use /dev/da1 for gm0 first. By doing this, both making a backup > of /dev/da0 and repartitioning before setting up the mirror > configuration can be done virtually. The step 3 may be complex in > some cases, but I personally think partitioning /dev/mirror/gm0 by > gpart based on the existing /dev/da0 is not so difficult. Basing on my previous discussion with pjd@ I believe that this is the correct way of setting up gmirror. Pawel, could you confirm please? -- Kind regards Daniel