How much disk space should be allocated for FreeBSD?

5,502

Solution 1

Why bother with a complicated set-up on a workstation? One partition sized 20GB (or 30GB if you plan to build the world from sources) should be plenty for / and the rest should go to /home. I was going to recommend ext4, but realised you are not using Linux. Why not just use whatever is available as default. Change this only if you have special needs.

Solution 2

I would use this kind of arrangement for 160G:

  • a: 100M / (the only thing that goes in / for BSDs is boot files, /root, and /etc)
  • b: 200M-1G (swap) Note, BSDs use swap much differently than Linux or Windows. You hardly ever need as much.
  • d: 100M-500M /tmp (however much tmp space you think you need. Make bigger if editing very large files)
  • e: 300M-20G /var (By default, /var/www is used by httpd for web serving. So make it big if you will be hosting, or if you have a ton of logs)
  • f: 10G-30G /usr (where all programs go, including ports.
  • g: 50-100G /home

Note that /home is the last partition. This is done on purpose. It's good practice to not partition all space. This way, if in the future you begin to run out of space in a partition you can add space from the unused space.

And why not just use a big / ? Mainly because it makes for easier upgrading and more granularity over security. for instance, using one big / you can't make use of nodev and nosuid mount options. You also can't tune for performance(noticeable performance) by using the noatime and friends in partitions which could benefit.

Solution 3

Read 'man tuning' for proper disk partitioning and why you should use different partitions, unlike what other posters have said. The handbook should be followed and, afaik, ALL FreeBSD users partition their systems as shown.

Share:
5,502
Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin over 1 year

    I have a Samsung N150 netbook with 160 GB hard disk. I want to install FreeBSD OS. There will be no other OSs, no dual booting or like that, just FreeBSD. So the manual says to have a separate partition for /var, /usr and /
    Earlier I used Ubuntu where I created / with 30 GB and rest for /home. But what will be the optimal disk size for use in FreeBSD? How much can /var grow into? Also if I install applications from ports where will it go? Is it to /usr/local/bin or /opt? Which is recommended?
    My usage will be as a development machine. i.e it will have all my personal stuffs like music plus development software, server etc. I think of having separate partitions for keeping development files and mounting when ever required. Also separate partition for other stuffs like music, docs etc. So that even if I reformat the OS, I will only have to wipe the OS files, and not my personal files. So which format (like ext4 or zfs) should those partitions have? Can those be on extended partition since FreeBSD need a primary partition.

    • Gilles 'SO- stop being evil'
      Gilles 'SO- stop being evil' about 13 years
      No matter what the manual says, I wouldn't create a separate partition for /var and /usr except with very special requirements (which you don't have). Separating the OS from your own data is a good idea, but dividing the OS into bits isn't useful.
    • Thorbjørn Ravn Andersen
      Thorbjørn Ravn Andersen almost 3 years
      It is always a good start to let the installer choose by using the suggested defaults. Then have a look when the system is up and running.
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' about 13 years
    The tuning man page is for performance tuning. Not everyone needs to make their life more complicated for a few percent of disk performance. Worse than that, its recommendations are not relevant to today's hardware, where the OS is a small part of the disk space, RAM (so disk cache) is cheap, and real performance comes from SSD or RAID rather than relying on disk geometry which the disk controller may be manufacturing out of thin cloth anyway. It's unfortunate that this advice hasn't been updated since it was written a decade ago.
  • plas
    plas about 13 years
    @Gilles - note that the first few paragraphs of 'tuning' directly address disk layout. Also see Eartz post.