Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jun 2013 14:58:23 -0500 (CDT)
From:      Robert Bonomi <>
Subject:   Re: =?UTF-8?Q?Re:_FreeBSD_slice/partiton_setup_?= =?UTF-8?Q?question?=
Message-ID:  <>
In-Reply-To: <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
> From  Tue Jun 18 13:47:50 2013
> Subject: =?UTF-8?Q?Re:_FreeBSD_slice/partiton_setup_?=
>  =?UTF-8?Q?question?=
> From: =?UTF-8?Q?Istvan_Gabor?= <>
> To: =?UTF-8?Q?FreeBSD_Questions?=<>,
>  =?UTF-8?Q?Michael_Sierchio?=<>,
>  =?UTF-8?Q?Michael_Sierchio?=<>
> Date: Tue, 18 Jun 2013 20:48:20 +0200
> 2013. jA nius 18. 19:49 napon Michael Sierchio <> A-
> rta:
> > On Tue, Jun 18, 2013 at 10:44 AM, Istvan Gabor <> 
> > wrote:
> > > ...
> > > How can I do this in FreeBSD? Can I have slices with only one 
> > > partition occupying the whole slice?
> > >
> > > Can I do something like the following:
> > >
> > > /dev/ad0s1a /
> > > /dev/ad0s2e /home
> > > /dev/ad0s3e /usr/local
> > > /dev/ad0s5b swap
> > > /dev/ad0s6e /home/user1
> > > /dev/ad0s7e /home/user2
> > > etc.
> > >
> > > where the partitions (a, e, b) occupy the whole slice where they 
> > > reside on?
> Thanks, but I don't understand your answer. I am puzzled a little bit. My 
> understanding based on the FreeBSD handbook is that slices in FreeBSD are 
> the partitions in linux. And that on one slice (linux partition) FreeBSD  
> has (or can have?) several partitions. These are labeled as letters: a 
> for root partition, b for swap, c for the whole slice, and e for a 
> regular non-root partition.

The terminology gets confusing.
'slices' in FreeBSD, and most other 'real' unix systems,  correspond to 
MSDOS/Windows 'partitions', on hardware that supports the MSDOS partitioning

Unix has its own layer of disk subdivision, referred to here as 'BSD 
partitioning' (to make clear it is not the same as Microsoft's 'fdisk'
functionality, as well. In the 'classical' form this gives the (up to 8)
'letter-named' pieces that a disk may be carved into.

You can use 'slices', giving filesystem names, after 'BSD partitioning', 
like '/dev/ad4s0a', or you can omit 'slice' creation, and do only a 'BSD
partioning scheme, giving device names like "/dev/ad4a". 

In the 'BSD partitioning' scheme, letter 'c' is reserved for the entire
disk, but SHOULD NOT ever be used directly.  One can create another 'BSD
partition' (using the letter of ones choice) that also spans the entire
disk.  There is no requirement to have more than one 'usable' partition
on the disk.

> > Why bother with partitions if you're going to use the whole slice?
> Are you saying that one can use/mount a whole slice without adding 
> partitions to it? For example /dev/ada0s1 could be the root partition?
> > Why bother with slices if you won't run out of partitions?
> Do you mean putting all partitions on one big slice? I would like to be 
> able to mount different partitions independently from other OS, eg. from 
> linux. As far as I know linux cannot mount FreeBSD partitions, only the 
> whole slice. If one slice has several partitions, one single partition 
> can not be mounted from linux.

A full discussion gets 'messy'. there are lots of variations that complicate
things -- including a single 'logical volume' with multiple physical disks
(e.g. RAID), a single physical disk with multiple 'logical drives' on it
(think 'fdisk' partitioning), *AND* the type of filesystem in use on the
logical volume/drive.

*ASSUMING* the 'Berkeley fast filesystem' (the traditional/classical 
system choice, also known as 'UFS'), a logical volume/drive must have a BSD 
'volume label' on it, which allows subdividing that logical volume/drive 
into (up to) 8 letter-names parts.   Each such 'part' holds a separate 
filesystem, and must be 'mounted', _individually_, before files on that 
filesystem can be acessed.  

The overall logic is similar for other filesystem types, however the 
mechanical details may be quite different.

> Could you please confirm if my understanding is correct, or explain a 
> little bit more detailed what you meant?

If you want a -single- filesystem to occupy an entire physical disk you can:
   a) use a 'dangerously dedicated' drive -- one with no 'fdisk' 
      partitioning and only a BSD volume label, and create a single
      'BSD partition' -- giving a device like '/dev/ad4h'
   b) creat a single 'fdisk' primary partition spanning the entire drive
      and put a BSD volume label on the primary partition, with only a
      single 'BSD partition' -- giving a device like '/dev/ad4s0h'
   c) do 'something similar' using a different partitioning scheme -- e.g.
      'gpart' -- instead of 'bsdlabel'.
   d) do 'something similar' using a different type of filesystem -- e.g.
      'ZFS' or 'EXT3' (beware: EXT3 is _not_ well-supported under FreeBSD,
      and there are 'good reasons' _not_ to use any of the EXT* filesystem
      types if one values the integrity of ones data in the event of 
      'unexpected' events.

Want to link to this message? Use this URL: <>