UFS partitioning

Polytropon freebsd at edvax.de
Tue Dec 2 02:17:43 PST 2008

On Tue, 2 Dec 2008 10:56:44 +0100 (CET), Pieter Donche <Pieter.Donche at ua.ac.be> wrote:
> If FreeBSD is to put on the system as only operating system (Fdisk:
> "A = Use Entire disk"), then will the BSD-partitions will show up as
> ad0a (/), ad0b (swap), ad0d (/var) etc... correct or not (then what)?

You're mixing terminology here. :-) The "use entire disk" will
create a slice for FreeBSD covering the complete disk. A slice
is what MICROS~1 calls "primary partition".

Now the conclusion: Let's say you create a slice on ad0, it will
be ad0s1. Now you can create partitions inside this slice as you
mentioned it, e. g. ad0s1a = /, ad0s1b = swap, ad0s1d = /tmp,
ad0s1e = /var, ad0s1f = /usr and ad0s1g = /home. But if you're
refering to ad0a, ad0b, ad0d etc. you're stating that there's
no slice, implying that (if I see this correctly) it isn't possible
to boot from that disk. Of couse, if you would intend to use
a (physical) second disk for only the home partition, you could
omit the slice and the partition and simply newfs ad1 - but
that wasn't your question.

    ad0 |-----------------------------------------------| the whole disk
  ad0s1  \----------------------------------------------/ one slice
 ad0s1X   \--/\---/\-----/\-----/\-------/\------------/  partitions
            a   b     d      e       f           g
            /  swap  /tmp   /var    /usr       /home      mount point

In case of "dual booting", you usually have more than one slice
on your disk, but what happens inside the FreeBSD slice is mostly
the same.

> Page 427 of the FreeBSD handbook states that due to the use of 32-bit
> integers to store the number of sectors is limited to 2^32 -1 
> sectors/disk = 2 TB. A layout could be 
> a / 1Gb, 
> b swap, 
> d /root 20 Gb, (a /root partition is from an example of someone who
> claims that at boot FreeBSD checks the partions in background except
> for the / partition, by keeping / as small as possible, the time to
> boot can be mimimized .. correct? but will /root ever be something
> big ??)

No no, / refers to "the root partition". One way of setting
up püartitions is just to have one partition (one root parttion)
and put everything on it, including /tmp, /var, /usr and /home.
Another philosophy is to create partitions designated to their
further use, just as I mentioned it above.

For /, you would hardly need more than 1 GB. It just contains
the kernel, basal system binaries, the configuration files and
the directories that are mount points for all the other file
systems. Even a 256 MB / partition should be enoung.

> e /tmp 20 Gb, 
> f /var 20 Gb, 
> g /usr 20 Gb
> this leaves 2420 Gb which is more than 2 Tb, so you can't put all 
> that in 1 filesystem h /home, you will need to split that in 2
> BSD-paritions, but since you can't have more that 8 BSD-partitions
> (highest BSD-partition letter is h), you need to give up at least
> one of d, e, f, g. ... correct or not (then what)?

I quite doubt that FreeBSD's UFS 2 cannot handle a 2 TB partition
as a whole, but because I don't have sch large disks with UFS
(I have ZFS for them), I cannot tell.

PS. Corrected subject (was missing).

>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list