The /usr partition

Hi,

According to:

http://www.freebsdwiki.net/index.php/Hard_Disk_Partition_Sizes

The /usr partition contains a few major sections. There are a few approaches to this section. One is to give it it's own largish partition. Second - and absolutely not recommended - is to lump it into the main / partition (and either move the ports tree or watch its size carefully).

Why is it not recommended to lump it into the main / partition? One of my FreeBSD systems is running without a separate /usr partition, should I change this?
 
The bsdinstaller in 9.0 by default will create just one big / .. so it's not a very hard no-go, but in BSD-land, sysadmins like to create partitions to minimize the risk of filling it > 100% (remember that by default, /tmp will come from /usr/tmp). Also, packages you install will go to /usr(/local). You don't want that taking space from your /.
 
  • Thanks
Reactions: ccc
Thanks, I have the following:
Code:
# cat /etc/fstab

# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ad0s2b             none            swap    sw              0       0
/dev/ad0s1a             /               ufs     rw              1       1
/dev/ad0s3d             /tmp            ufs     rw              2       2
/dev/ad0s4d             /var            ufs     rw              2       2
/dev/acd0               /cdrom          cd9660  ro,noauto       0       0
linproc                 /compat/linux/proc/  linprocfs  rw      0       0
Code:
# df -m
Filesystem  1M-blocks Used Avail Capacity  Mounted on
/dev/ad0s1a     24207 5355 16915    24%    /
devfs               0    0     0   100%    /dev
/dev/ad0s3d       964    0   887     0%    /tmp
/dev/ad0s4d      9823  251  8786     3%    /var
linprocfs           0    0     0   100%    /usr/compat/linux/proc
Should I change something to prevent problems in the future, or just leave like this?
 
Looks like you have plenty of space left in /. I'd probably not change it. But if it's a critical server, I would prefer to partition, something like:

Code:
/    1GB
/usr 15GB

.. that's more or less always the same. You could then decide to even slice-up /tmp and /var/tmp (I do), each 5GB or so. How much you need in /var depends on how much logging your machine produces, and how much you decide to keep. Or is it a big database server (mysql stores in /var/db/mysql by default)? Is it a mailserver with a huge mailspool? All go into /var.

Keeping / small minimizes the risk of that partition becoming damaged, so the system can at least always boot. But never make it smaller than 1GB. If you run freebsd-update and get a new kernel, the old and new together can consume up to 400-500 MB.
 
  • Thanks
Reactions: ccc
Back
Top