From owner-freebsd-geom@FreeBSD.ORG Thu Sep 14 16:00:00 2006 Return-Path: X-Original-To: freebsd-geom@FreeBSD.ORG Delivered-To: freebsd-geom@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 215E316A412 for ; Thu, 14 Sep 2006 16:00:00 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id BE28C43D46 for ; Thu, 14 Sep 2006 15:59:58 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (fgjajc@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k8EFxpIZ056653 for ; Thu, 14 Sep 2006 17:59:57 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k8EFxp2P056652; Thu, 14 Sep 2006 17:59:51 +0200 (CEST) (envelope-from olli) Date: Thu, 14 Sep 2006 17:59:51 +0200 (CEST) Message-Id: <200609141559.k8EFxp2P056652@lurza.secnetix.de> From: Oliver Fromme To: freebsd-geom@FreeBSD.ORG X-Newsgroups: list.freebsd-geom User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 14 Sep 2006 17:59:57 +0200 (CEST) Cc: Subject: gmirror size question X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-geom@FreeBSD.ORG List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Sep 2006 16:00:00 -0000 Hi, I've read the gmirror manpage and the Handbook section, and even had a short look at the source, but couldn't find an answer ... I plan to setup gmirror for a production server with two identical disks (Fujitsu U160 SCSI); they have exactly the same number of blocks. Now I wonder what will happen if one drive fails and I won't be able to get a drive with exactly the same size. The problem is that not all 74GB drives have exactly the same number of blocks, not even those from the same vendor. Using the next larger size (147GB) would be a waste. If the new disk is sligtly larger, I guess there shouldn't be a problem. When adding the new drive, gmirror will simply ignore the excess blocks, right? However, I guess I'll run into trouble if the new drive is slightly smaller. Therefore, it came to my mind that it might make sense to make the mirror slightly smaller from the beginning, i.e. let gmirror use only the first 73GB of the 74GB available. That should be enough of a safety margin. However, how do I do that? gmirror(8) doesn't provide an option to specify the size of the consumer, or to let it ignore a certain amount of space at the end of it. My next thought was to create separate slice tables on both disks, with one slices of 73GB each (letting 1GB stay unused), and then put gmirror onto the slices (da0s1 + da1s1) instead of the whole disks (da0 + da1). I guess that would work, but in that case the MBR and slice tables wouldn't be mirrored, which could lead to trouble if one drive fails and GEOM (or anything else) tried to access the MBR for whatever reason. So ... what's the best solution to the problem? Any comments and ideas are appreciated. Best regards Oliver PS: No need to Cc me; I'm reading the list. -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "Documentation is like sex; when it's good, it's very, very good, and when it's bad, it's better than nothing." -- Dick Brandon