From owner-freebsd-current@FreeBSD.ORG Fri May 9 13:14:58 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E37C37B401 for ; Fri, 9 May 2003 13:14:58 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33BB743F3F for ; Fri, 9 May 2003 13:14:55 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h49KEqxa013474; Fri, 9 May 2003 22:14:52 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: kalts@estpak.ee From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 09 May 2003 08:21:45 +0300." <20030509052145.GA595@kevad.internal> Date: Fri, 09 May 2003 22:14:52 +0200 Message-ID: <13473.1052511292@critter.freebsd.dk> cc: freebsd-current@freebsd.org Subject: Re: GEOM loose end? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 May 2003 20:14:58 -0000 In message <20030509052145.GA595@kevad.internal>, Vallo Kallaste writes: >Hi > >Several times now I've encountered following situation: > >I have harddisk with two slices, remaining space unallocated. >There's FreeBSD system installed on the first slice, other one used >as temporary storage, i.e. both have disklabel and mounted >filesystems. >Now I want to create third slice for whatever reasons. I know that >it's impossible without setting special geom debugflag, so I'll set >it kern.geom.debugflags=16. Using sysinstall I'll create the third >slice and write new slice table down to disk. Fdisk(8) confirms that >third slice is there. The only thing missing is now /dev entry for >this slice, there's no /dev/adXs3. This /dev entry will be created >when I reboot the system, but that's not acceptable. Any workaround? Well, the loose end is in libdisk which is a loose canon. (Sysinstall uses libdisk.) libdisk was built to run in "installer mode", and it was written to be small. It was never written as a general disk management tool but at some point it seems to have become that, proxied by sysinstall. The very reason why you need to set a debug flag in geom is that libdisk sneaks under the entire GEOM stack when it writes its changes to the disk, and the kernel/GEOM has not been and will not be bloated with code to detect this hack. We _really_ need to revist the area of disk management programs, there is a bid out there called "libwhisk" which as far as I can tell would make a good foundation. Unfortunately, I don't have time to work much on this issue, just getting the kernel side and the basic tools (bsdlabel(8), sunlabel(8) etc in shape takes most of the time I have. Try using "bsdlabel -e" next time, it is not as hard as you might fear. -- 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.