3

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.

  • 2
    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. – Gilles Apr 9 '11 at 16:03
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.

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.

1

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.

  • 2
    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. – Gilles Apr 10 '11 at 15:59
  • @Gilles - note that the first few paragraphs of 'tuning' directly address disk layout. Also see Eartz post. – Rob Apr 11 '11 at 2:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy