From owner-freebsd-hackers Tue Apr 22 13:25:29 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id NAA01262 for hackers-outgoing; Tue, 22 Apr 1997 13:25:29 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id NAA01236 for ; Tue, 22 Apr 1997 13:25:23 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA26960; Tue, 22 Apr 1997 13:23:06 -0700 From: Terry Lambert Message-Id: <199704222023.NAA26960@phaeton.artisoft.com> Subject: Re: disklabel -- owner? To: joerg_wunsch@uriah.heep.sax.de Date: Tue, 22 Apr 1997 13:23:06 -0700 (MST) Cc: freebsd-hackers@freebsd.org In-Reply-To: <19970422084412.TC53852@uriah.heep.sax.de> from "J Wunsch" at Apr 22, 97 08:44:12 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > You don't need a minor number for it at all, *if* you reexport devices > > based on the fan-out from a DOS partition table. > > What do you do for a drive that has no DOS partition table (e.g. a new > one)? You've got a chicken-and-egg problem, and that's what this > minor number is for. More correct to ask "what do you do for a device without any type of partitioning whatsoever?" than to limit yourself to DOS. The answer is you export the raw device only. Then you ioctl() the raw device to get the partition types you can place on it, pick one of them, and ioctl() down to "init" the device with an empty (default) table. Then you ioctl() down to stat the empty table to get the max number of entries, allocate an array ov volume descriptor structures, and ioctl() down to read the existing data into the structures. Then you manipulate the structures contents, not caring what the actual partitioning schema is. When you are done, you ioctl() down to write the table, and the newly defined valid partitions cause "device arrivals" and create more devices. If you are running devfs, the devices show up automatically, if not, you have to run /dev/MAKEDEV. Pretty simple. > No, thanks. I avoid this crap (fdisk tables) whenever i can. I have > no need for it. The current scheme at least works. 8 partitions > aren't much, but if somebody's gonna change something at all, he > should consider writing a logical volume manager anyway. CCD is a type of logical volume management interface. If you want you logical volume manager to be interactive, well, then remove the barriers to easily writing a JFS/XFS/VXFS clone FS; otherwise, once an FS is using the volume, it's not correct to resize it without causing the FS to be destroyed. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.