From owner-freebsd-questions@FreeBSD.ORG Fri Jun 27 20:25:02 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E31D21065672 for ; Fri, 27 Jun 2008 20:25:02 +0000 (UTC) (envelope-from booloo@ucsc.edu) Received: from root.ucsc.edu (root.ucsc.edu [128.114.2.68]) by mx1.freebsd.org (Postfix) with ESMTP id DC8628FC21 for ; Fri, 27 Jun 2008 20:25:02 +0000 (UTC) (envelope-from booloo@ucsc.edu) Received: from root.ucsc.edu (localhost [127.0.0.1]) by root.ucsc.edu (8.13.8/8.13.8) with ESMTP id m5RJjtSW042734 for ; Fri, 27 Jun 2008 12:45:55 -0700 (PDT) (envelope-from booloo@root.ucsc.edu) Received: (from booloo@localhost) by root.ucsc.edu (8.13.8/8.13.8/Submit) id m5RJjtee042733 for freebsd-questions@freebsd.org; Fri, 27 Jun 2008 12:45:55 -0700 (PDT) (envelope-from booloo) Date: Fri, 27 Jun 2008 12:45:55 -0700 From: Mark Boolootian To: freebsd-questions@freebsd.org Message-ID: <20080627194555.GA42681@root.ucsc.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.15 (2007-04-06) X-Spam-Status: No, score=-1.4 required=20.0 tests=ALL_TRUSTED, DKIM_POLICY_SIGNSOME, DK_POLICY_SIGNSOME autolearn=failed version=3.2.1 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on root.ucsc.edu Subject: gmirror metadata: end of slice or end of disk? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: booloo@ucsc.edu List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jun 2008 20:25:03 -0000 Hi folks, I'm trying to understand exactly where on disk gmirror is going to write its metadata, and was hoping I could elicit comments on whether I have this right or not. Assume my disk, da1, has a single slice, and I partition it as follows (i'm making up sector sizes for the sake of simplicity): length start a: 100 16 4.2BSD b: 10 116 swap c: 626 0 d: 500 126 4.2BSD If I then use 'gmirror label -v -b round-robin gm0 /dev/da1s1', my belief is that gmirror will write its metadata into sector 499 (the last sector in the slice, which falls in partition 'd'). Thus, the disk I want to mirror (da0) should have a 'd' partition that is 499 sectors in size. If it were 500, I would be asking for trouble down the road. Taking a slightly different approach, consider the recommendations here: http://lantech.geekvenue.net/chucktips/jason/chuck/1175552464/index_html where the command to establish the metadata is gmirror label -v -b round-robin gm0 /dev/da0 I believe that means the metadata will be written in the last sector of the disk. Presumably this is part of the space left when fdisk is used to set up the FreeBSD slice (assuming a single slice - and i'm assuming there is virtually always space left), so the recommendation (setting up gmirror on your live system disk) should work. Have I got that right? Assuming a single slice configuration, is there a reason to prefer one approach over the other? (i.e. metadata at end of slice versus at end of disk)? thanks in advance, mark