Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jul 2011 17:05:01 +0200
From:      Polytropon <freebsd@edvax.de>
To:        tethys ocean <tethys.ocean@gmail.com>
Cc:        FreeBSD_Questions <freebsd-questions@freebsd.org>
Subject:   Re: mount /unmount
Message-ID:  <20110704170501.b9479535.freebsd@edvax.de>
In-Reply-To: <CAOgxTUjH9kObmRmvg8p_XDb34U4gfvtgCOCpzV5J4otg5XrgQg@mail.gmail.com>
References:  <CAOgxTUikp5XODhus35vt783s607Y%2Bz8JE3UoxL1dV8f=rS19Kw@mail.gmail.com> <20110704151505.99e0ed4d.freebsd@edvax.de> <CAOgxTUjH9kObmRmvg8p_XDb34U4gfvtgCOCpzV5J4otg5XrgQg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 4 Jul 2011 17:50:36 +0300, tethys ocean wrote:
> *Means that /usr is not slice ?? or /var is not slice?   are all these are
> UFS ?*

In traditional FreeBSD disk partitioning, a disk can hold
4 slices. In MICROS~1 land, those are called "DOS primary
partitions". Unlike there, FreeBSD usually just needs one
slice to install into.

The FreeBSD slice is divided into partitions. Each partition
carries a UFS file system - except the swap partition. Those
partitions are then mounted. This means that in default installs
/usr and /var are the mountpoints of the corresponding
partitions (to be fully correct in terminology) that
have a UFS file system.

Example:

ad0	= the 1st DISK
ad0s1	= the 1st SLICE on the 1st disk
ad0s1a	= the 1st PARTITION on the 1st slice on the 1st disk,
	  formatted with UFS

Each partition is assigned a mountpoint. This is the "connection"
used by the mount command: It mounts the device specifying a
partition to the given mountpoint directory.

A common method of partitioning is this:

# Device	Mountpoint	FStype	Options		Dump	Pass#
# -----------	--------------	------	-------------	-----	-----
/dev/ad0s1b	none		swap	sw		0	0
/dev/ad0s1a	/		ufs	rw		1	1
/dev/ad0s1d	/tmp		ufs	rw		2	2
/dev/ad0s1e	/var		ufs	rw		2	2
/dev/ad0s1f	/usr		ufs	rw		2	2
/dev/ad0s1g	/home		ufs	rw		2	2

(In the _default_ install, /home is symlinked to /usr/home which
means it's not a separate partition.)

However, it's possible to just create one partition and install
all the system's functional parts into that one partition.
Mounting it will give access to all subtrees.

Basically, my comment was about the correct terminology which
is important to use in order to avoid misinterpretations.

There is also a mechanism called "dedicated partitioning"; it's
the same as above, just omitting the slicing part, i. e. partitions
are created directly on the disk (ad0a, ad0d, ad0e, ad0f and so on).

Other partitioning mechanisms do also exist, like GPT (using
gpart instead of traditional MBR tools fdisk + bsdlabel), here
partition names are ad0p1, ad0p2 and so on. It's also possible
to identify partition devices with labels instead of "bare
numbers", this can be done by labeling them.

And of course there's ZFS. :-)

You can find more information in the FreeBSD handbook.

3.5 Disk Organization
http://www.freebsd.org/doc/handbook/disk-organization.html

18.3 Adding Disks
http://www.freebsd.org/doc/handbook/disks-adding.html

19.6 Labeling Disk Devices
http://www.freebsd.org/doc/handbook/geom-glabel.html


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



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