Re: More than 8 labels per slice

From: Allan Fields <bsd_at_afields.ca>
Date: Tue, 27 Apr 2004 16:21:32 -0400
About this: I ran into the same issue while I was setting up a
multi-boot test machine.  Basically I've got an inexpensive 120GB
drive multibooting 3 different BSDs variants and a couple of Linux
distros.  I would like to add DFBSD at some point soon.

An advantage of having all these together on the same machine is
that I can compare performance on identical hardware.  I've got a
few spare partitions set aside which I use for testing filesystems.

While cramming so many OSes on the same drive was the least expensive
route, it does present some issues with regards to differing label
formats.  I didn't fully expect it to be problem-free setting up a
multiboot and I'm not opposed to putting more storage in this machine
at some point; but for the time being I've got it setup with the
single drive using grub as my bootloader.

Partition Layout:
1:	OpenBSD
2:	FreeBSD
3:	NetBSD
4:	Extended
	5:	Windows 2K (NTFS)
	6:	Shared (FAT32)
	7	DFBSD Shared /usr (ufs)
	8	DF/FBSD Shared /home (ufs)
	9:	Linux Swap
	10:	Linux Boot (e2fs)
	11:	Linux Temp (e2fs)
	12:	Linux Gentoo Root (e2fs)
	13:	Linux Gentoo Usr (reiserfs)
	14:	...
	n:	Test Partitions

As you can see the primary partitions are now all used, so if
I wanted to add DFBSD, I can't afford to give it it's own primary
partition -- same goes for Darwin.  I left space in the FreeBSD
disklabel thinking I might be able to piggy-back DFBSD on that
partition.  Ultimately I'm going to need to use some logical
partitions (w/o labels) and/or another HD to make it all fit with
the 7-slice limit.

Usually I have the following generic slice entries:
	a	/
	b	swap
	c	---
	e	/tmp
	f	/var
	g	/usr
	h	/home

The other growing pain is that sysinstall doesn't yet support using
logical partitions during setup though you can mount them manually
in the fixit shell.

Additionally, to the best of my knowledge it's not support/advisable
to have any BSD disklabels in extended logical partitions.  Should
this be supported in the future?  (Perhaps w/ GEOM)


On Tue, Apr 27, 2004 at 09:31:15AM -0700, Matthew Dillon wrote:
> 
> :Dear coders,
> :
> :is there any chance that FreeBSD can adopt the OpenBSD changes reagrding UFS
> :labels? I'm using one label per jail and this old 8 label limit forces me to
> :use different slices which sometimes, when I have to change label sizes, is
> :abig handicap.
> :Having 16 labels would improove the jail-handling greatly IMHO. Having 32
> :labels (like I think NetBSD) was even greater, but lifting the 8 label limit
> :would suffice I think.
> :
> :Thank you in advance,
> :
> : Harry
> 
>     It's codeable.  I did this for DragonFly, stealing one of the other
>     device bits to extend the partition id from 3 to 4 bits. 

Am I going to be able to share a disklabel between DFBSD and FBSD?
Since, basically you can setup DFBSD by copying from the CD, I was
thinking of specifying /usr, /home as residing on logical partitions
like Linux does, while keeping the root,tmp,var fs in the primary
partition's disklabel.  /tmp can share w/ FBSD.

>     But in the recent past somebody decided to squeeze the boot1 code
>     (I think it's boot1) right next to the existing partition table, and
>     that would have to be moved back to its original location in order to
>     free up enough space to extend the partition table to 16 elements. 
>     It may or may not be possible with UFS+UFS2 support, someone
>     experiementation would be required.
> 
>     You might be better off creating multiple slices instead, which works
>     right now.  Each slice has its own partition table.  For example, on
>     one of my FreeBSD boxes I have this:
> 
> /dev/da0s1a                         127023   101043    15819    86%    /
> /dev/da0s1d                       12862777 10394690  1439065    88%    /FreeBSD
> /dev/da0s1e                         508143    97493   369999    21%    /var
> /dev/da0s1f                         508143    34366   433126     7%    /var/tmp
> /dev/da0s1g                        4065262  1519750  2220292    41%    /usr
> /dev/da0s1h                        4065262  2564093  1175949    69%    /home
> /dev/da0s2a                         127023    80319    36543    69%    /altroot
> /dev/da0s2d                        2032623   720480  1149534    39%    /archive
> /dev/da0s2e                        3048942    14723  2790304     1%    /backup1
> /dev/da0s2f                        4065262  2728267  1011775    73%    /home2
> /dev/da0s2g                        4065262   632084  3107958    17%    /cvs
> /dev/da0s2h                        9813819  5626600  3402114    62%    /usr/obj
> /dev/da0s3d                       23516922  3590234 18045336    17%    /u1

On this machine, I've already used all the primary partitions just
supporting the three different disklabel formats of O/N/FBSD.

> 					-Matt
> 					Matthew Dillon 
> 					<dillon_at_backplane.com>

-- 
 Allan Fields
 AFRSL - http://afields.ca
 BSDCan: May 2004, Ottawa - http://www.bsdcan.org
Received on Tue Apr 27 2004 - 11:21:37 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:52 UTC