New user - small file server questions and quick GUI question

Jerry McAllister jerrymc at msu.edu
Tue Dec 29 17:30:37 UTC 2009


On Tue, Dec 29, 2009 at 04:27:11PM +0000, Frank Shute wrote:

> On Tue, Dec 29, 2009 at 05:19:54PM +0200, Kaya Saman wrote:
> > 
> > Many thanks guys for all the advice!!!! :-)
> > It is really appreciated!
> > ...
> > 
> > I reckon the proposed disk usage spec from the FreeBSD hand book should 
> > suffice though shouldn't it??
> 
> IMO the root slice is too small in the handbook. You should make it
> 2GB, since you've got the space.

First of all, you are mixing up your terminology.  
You do not mean 'slice' here.
The unit used for root or any other filesystem in 
a non-"dangerously-dedicated" disk is called a partition.   
Partitions divisions of slices and are identified 
as a..h with c reserved for the system and by 
convention (and expectation of some pieces of software) 'a' 
is for the bootable OS partition (root) and 'b' is used for swap.   

In FreeBSD, partitions reside inside of slices.   A slice is 
essentially the same thing as a DOS primary partition and is the 
initial (primary) division of a disk.   A disk drive may have up 
to four slices identified as 1..4 and each may be made bootable 
or not and contain different OSen or OS versions.   If a disk is 
only to be used for a single installation of FreeBSD, it is most 
common to define just one slice which encompasses the whole drive, 
leaving the other three slices empty and unused.  (It is also 
common to define a 'dangerously dedicated' disk, but that is
a different discussion issue than that being addressed here)  

In FreeBSD, slices are defined and created by the FreeBSD fdisk 
program, though a number of other partition management utilities 
can be used and FreeBSD seems to be moving to a new one too.

In FreeBSD, one uses bsdlabel(8) to create partitions within a
slice.   Each slice can have up to 8 identified as a..h, but the 'c'
partition is reserved and must be left unused.

We use common names associated with partitions, such as / (root)
 /usr, /var, /home, etc.  Those are essentially directories that
are 'linked' to a partition by the mount system.  You create 
a mount point using the mkdir(1) command and then link using mount(8).

The 'a' partition becomes root because it gets mounted to the / mount point.  

Now, on to divvying up the disk. 
I agree that the root partition listed in the handbook is anciently 
too small.  But, I don't see what you need 2GB for unless you put
everything (/usr, /var, etc) in it.   Since you are defining those
separately, root really only needs about a half GigaByte.   I am
running a little low on one machine with 1/3 GB in root, but still going.
I also create a partition for /tmp to keep it isolated from the
other filesystems, in case something runs wild.

> > 
> > With a larger HD I would normally do something like 15 - 25GB / (root) 
> > partition and the rest for /home with round 1.5 - 3GB for swap.
> > 
> > Now my HD is round 40GB so I will do a minimal install and try to 
> > maximize the /home slice! As result only services I will run are DNS, 
> > NTP, SAMBA and NFS.
> 
> What is not unusual is to symlink /home e.g:
> 
> # ln -s /usr/home /home
> 
> ditto for /tmp.  i.e you remove all the stuff that uses up space from
> the root partition.
> 
> So the only slices you need are /, /usr, /var and swap.
> 
> How I'd slice up the disk:
> 
> 2GB for /
> 2GB for swap
> 2GB for /var
> 34GB for /usr

> > 
> > I suppose I could get away with something like 2GB for / which would 
> > then contain /tmp, /etc, /root, /boot etc.....

My suggestion is more like:

 partition   mount point     Size 
   a            /             512 MegaBytes  (1/2 GByte)
   b            swap         2048 MBytes     (2 GBytes)
   d            /tmp          512 MBytes
   e            /usr         4096 MBytes
   f            /var         4096 MBytes
   g            /home          29 GB  (eg all of the rest of the disk)

If you are running a database, you will want /var to be larger or
to move things in to that /home file system.

I actually use a different mount point name than /home because /home
is assumed for other things in some howto-s hanging around.

I also move and symlink  
                  /usr/local  
                  /usr/ports  
                  /usr/src      
and sometimes     /var/spool  
in to that '/home' filesystem and then make the actual /usr and /var 
only half the above sizes and increase the space in '/home' (33 GB) so 
they can grow there more easily.

Things in a well running system do not grow so much in /tmp and
if something does go wild and spew out a lot of stuff, you really
want to notice it before it gobbles up 30GB of space, so you 
need enough /tmp to run easily, but do not want huge amounts.  
Thus, putting /tmp in its own limited partition is a bit of a protection.

All users' login (home) directories and web content go in that '/home'
filesystem too, where they can grow without having to redo disk later.

In spite of the name that seems to suggest it, I never put users' home
directories in /usr.   It may have begun that way back in the earliest
of days, but /usr has become part of the OS rather than the place for
users to work so I don't want users's monkey business to foul up /usr.

////jerry

> 
> Should be OK but /tmp symlinked to /usr/tmp as some things can really
> fill up /tmp. For example, IIRC OpenOffice needs gigs of temp space
> to build.
> 
> > 
> > Only 2 machines will be connected, my uncles Win XP box and my 
> > Linux/Solaris system.
> 
> Should work fine. Just remember to make your /home and /tmp symlinks
> as soon as you first boot up.
> 
> Regards,
> 
> -- 
> 
>  Frank
> 
>  Contact info: http://www.shute.org.uk/misc/contact.html
> 
> 
> _______________________________________________
> 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