Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Apr 1997 13:23:06 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: disklabel -- owner?
Message-ID:  <199704222023.NAA26960@phaeton.artisoft.com>
In-Reply-To: <19970422084412.TC53852@uriah.heep.sax.de> from "J Wunsch" at Apr 22, 97 08:44:12 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704222023.NAA26960>