From owner-freebsd-fs@FreeBSD.ORG Sat Nov 14 20:40:18 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA1EB1065679 for ; Sat, 14 Nov 2009 20:40:18 +0000 (UTC) (envelope-from 000.fbsd@quip.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) by mx1.freebsd.org (Postfix) with ESMTP id 774368FC1D for ; Sat, 14 Nov 2009 20:40:18 +0000 (UTC) Received: from localhost (localhost.codelab.cz [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id 15C3919E023; Sat, 14 Nov 2009 21:40:17 +0100 (CET) Received: from [192.168.1.2] (r5bb235.net.upc.cz [86.49.61.235]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id 6401419E019; Sat, 14 Nov 2009 21:40:14 +0100 (CET) Message-ID: <4AFF15AE.4070902@quip.cz> Date: Sat, 14 Nov 2009 21:40:14 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.4) Gecko/20091017 SeaMonkey/2.0 MIME-Version: 1.0 To: Lorenzo Perone References: <1A8F306A-8749-471B-94EA-FC8435A30C34@yellowspace.net> In-Reply-To: <1A8F306A-8749-471B-94EA-FC8435A30C34@yellowspace.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-fs@freebsd.org Subject: Re: gmirroring slices X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Nov 2009 20:40:18 -0000 Lorenzo Perone wrote: > > Hello, > > I was wondering if anyone could give me an advice on how viable and > reliable it is, to use gmirror on a slice of an MBR-style partitioned > disk, and use the second slice(s) within a zpool. > > I remember a discussion here on where metadata is kept (always at the > end of the disk as opposed to the end of the given consumer?), so I > wasn't sure about how much of a good idea this might be. I think metadata is stored at the end of the provider (slice in this case), but I am not a GEOM expert. > The reason I'd > like to have it like this is, that I had mixed bad experiences in the > effort of using ZFS as a boot and root volume, so I'd rather keep a > traditional slice for booting/rooting, and a zpool for the production > jails on that machine. > > The example would be > > provider: mirror/gm0 > consumers: ad6s1 and ad8s1 > > zpool mirror made out of > ad6s2 and ad8s2 I am running following setup for year without any configuration problems # gmirror status Name Status Components mirror/gms1 COMPLETE ad4s1 ad6s1 # zpool status pool: tank state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM tank ONLINE 0 0 0 mirror ONLINE 0 0 0 ad4s2 ONLINE 0 0 0 ad6s2 ONLINE 0 0 0 The first slice is 20GB partitioned as usual: # mount -t ufs /dev/mirror/gms1a on / (ufs, local) /dev/mirror/gms1e on /usr (ufs, local, soft-updates) /dev/mirror/gms1d on /var (ufs, local, nosuid, soft-updates) /dev/mirror/gms1f on /tmp (ufs, local, noexec, nosuid, soft-updates) The rest (450GB) is used in ZFS mirrored zpool for jails (each jail has its own filesystem) > while experimenting, I got into the problem that gmirror label -v -b > round-robin gm0 ad6s1 got a permission denied (even with sysctl > kern.geom.debugflags=16/17). Any hints on what can cause this (I might > have screwed up something with fdisk/bsdlabel, but after doublechecking > I wonder what it could be..) I did it in non-standard way - converting already installed system on one disk to mirrored. So when I was in system running off ad6 I created two slices on ad4, setup gmirror gms1 from first slice of ad4, create partitions, newfs, mount it and transfer files from running system by dump & restore, edit fstab. Then I rebooted system from gms1, destroy content of ad6, create slices on ad6 and insert first slice in to gms1. After this I had ad4s2 and ad6s2 ready for zpool. All was done remotely through ssh. Miroslav Lachman