From owner-freebsd-geom@FreeBSD.ORG Thu Feb 8 12:55:07 2007 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E27416A40F for ; Thu, 8 Feb 2007 12:55:06 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id 9A09C13C494 for ; Thu, 8 Feb 2007 12:55:05 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l18Csv8M031366; Thu, 8 Feb 2007 06:55:00 -0600 (CST) (envelope-from anderson@freebsd.org) Message-ID: <45CB1DA1.3060003@freebsd.org> Date: Thu, 08 Feb 2007 06:54:57 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070204) MIME-Version: 1.0 To: Poul-Henning Kamp References: <9223.1170930805@critter.freebsd.dk> In-Reply-To: <9223.1170930805@critter.freebsd.dk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2534/Wed Feb 7 21:28:17 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: Ivan Voras , freebsd-geom@freebsd.org Subject: Re: New g_part class X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Feb 2007 12:55:07 -0000 On 02/08/07 04:33, Poul-Henning Kamp wrote: > In message <45CAFA66.3030800@fer.hr>, Ivan Voras writes: >> Poul-Henning Kamp wrote: >>> In message , Ivan Voras writes: >>>> span the whole disk, thus conflict with gmirror which wants to use the >>>> last sector. >>> And just how does "the last sector" not occupy the same sector as >>> the last sector of the last mounted partition ? >> A joke? :) >> >> (in case it isn't: that's the point: it DOES, so people can't create >> mirrors of live paritions. But, like I said, I realize there's no >> elegant solution). > > The correct solution is a lot of code, and all you gain is that > you save a single reboot. > > Ideal Computer Science Method: > > * use mount to tell filesystem to avoid last sector. > * use gctl to tell slicer to reduce parition by last sector > * implement new API so slicer can ask consumer (filesystem) > if reducing size is OK. > * use gctl to tell slicer to avoid last sector. > * use gctl to insert mirror class below slicer > * use gctl to tell mirror class to write metadata > > Practically Sensible Method: > > * boot single user (possibly from CD) > * use fsdb or growfs to reduce filesystem size I didn't realize growfs let you shrink file systems. I didn't see any mention of this in the man page either. If you know otherwise, can you please fill us in, and/or update the man page? Also - you are actually recommending using fsdb to modify a file system as 'practically sensible'? Heheh - that makes me giggle. > * reduce partition size > * use gmirror to write metadata > * reboot > This certainly has been an interesting thread so far... Eric