From owner-freebsd-geom@FreeBSD.ORG Thu Feb 8 10:33:28 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 2110E16A400 for ; Thu, 8 Feb 2007 10:33:28 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id D871313C4A5 for ; Thu, 8 Feb 2007 10:33:27 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 65DF31747B; Thu, 8 Feb 2007 10:33:26 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.8/8.13.8) with ESMTP id l18AXP5G009224; Thu, 8 Feb 2007 10:33:25 GMT (envelope-from phk@critter.freebsd.dk) To: Ivan Voras From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 08 Feb 2007 11:24:38 +0100." <45CAFA66.3030800@fer.hr> Date: Thu, 08 Feb 2007 10:33:25 +0000 Message-ID: <9223.1170930805@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: 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 10:33:29 -0000 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 * reduce partition size * use gmirror to write metadata * reboot -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.