How should I partition 2 80 gig drives?

Jerry McAllister jerrymc at clunix.cl.msu.edu
Tue Sep 6 07:09:55 PDT 2005


> 
> I want to set up FreeBSD 5.4 Release to fully use 2 80 gig hard drives. 
> I'm not sure how I
> should set these up in disklabel editor. I just want to use this as a 
> general purpose machine.

General purpose can also mean many different things.    
Do you mean a personal desktop or would that include serving
a web site or  include some database stuff or name service (DNS).
How about Email and virus checking and how about ftp and allowing
anonymous ftp.    Will others be allowed to have accounts and log in.
Will you mostly use it from the 'console' eg keyboard, monitor and mouse
plugged directly in to the machine or over the net.   How about music
and video - are you planning to create you on personal video memoirs?
All of these things affect how you allocate resources as well as which 
software you install.

You didn't say how much memory your box has either.

But, with that much disk, as long as you don't plan to serve a large
database (but some moderate personal database such as names, books,
CDs & tapes, etc) or allow extra users that you isolate in some separate
space, a basic system with about 1 GB of memory might go like:

  (a) 512 MB   /      (root)
      2 GB     swap
  (e) 512 MG   /tmp
  (f) 2 GB     /usr  
  (g) 20 GB    /var
  (g) remainder of disk 0 (about 50 GB) /home

      2 GB     swap
  (e) remainder of disk 1 (about 70 GB) /work

Then move /usr/local to /home/usr.local and create a symlink
     move /usr/ports to /home/usr.ports and create a synlink
Also maybe
     move /var/spool to /home/var.spool and create a symlink
     move /var/mail to  /home/var.mail  and create a symlink
     move /var/log to   /home/var.log   and create a symlink

If 20 GB turns out to not be enough for your databases, then later
move some or all of /var/db  to /work/var.db  and create a synlink

The typical book and handbook examples of very tiny root and swap
and having /tmp inside /usr or whatever are out of date in a world
of many GB disks and GT 1 GB memory.    On the other hand, you don't
really want to make root too giant and stick everything in there because 
it means that, if you need to recover from backups after a disaster, 
you would have to load and do everything on that giant root.  With
a reasonable sized root, you can rebuild it and get enough of the
system going to make it easy to finish recovering.   Also, having
a moderate sized root reduces the likelyhood, somewhat, that a 
disk error will pop up in your root partition and that makes a
potential recovery a little more possible.      

Actually, that last is true of all the file systems.   The model I show 
above shows putting only basic stuff in  smaller file systems and then
everything else in giant rest-of-the-disk file systems.  But, having more 
moderate sized divisions of disk means that you spread stuff out over 
more divisions and that means less stuff is affected when a disk error 
shows up in a particular division (partition).    Of course, it also 
makes doing backups more complicated.    So, you balance that.
  
////jerry
> 
> thanks,
> Bob
> 
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> 



More information about the freebsd-questions mailing list