Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Dec 2009 21:53:33 +0000
From:      Frank Shute <frank@shute.org.uk>
To:        Jerry McAllister <jerrymc@msu.edu>
Cc:        freebsd-questions@freebsd.org, Kaya Saman <SamanKaya@netscape.net>
Subject:   Re: New user - small file server questions and quick GUI question
Message-ID:  <20091229215333.GA39411@orange.esperance-linux.co.uk>
In-Reply-To: <20091229172548.GA9656@gizmo.acns.msu.edu>
References:  <4B3927EB.4030802@optiplex-networks.com> <6201873e0912281420n590b173dtac94f9936cca6e3@mail.gmail.com> <4B393463.5060504@netscape.net> <6201873e0912281504j552d6351mf64d8e566d54bcef@mail.gmail.com> <20091229142310.GD90870@Alex1.lan> <4B3A1E1A.1040506@netscape.net> <20091229162711.GA38738@orange.esperance-linux.co.uk> <20091229172548.GA9656@gizmo.acns.msu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 29, 2009 at 12:25:48PM -0500, Jerry McAllister wrote:
>
> 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.   

You're correct. I thought they used a separate slice for the root
partition. They don't. I usually do.

> 
> 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.

I'm struggling with a 1GB / here:

/dev/ad0s2a    984524   657068   248696    73%    /

That's having removed /boot/kernel.old/ after running out of space
during upgrading to 8.0

I can't see anything else I can delete. /home and /var are not on that
slice.

So I think it depends on how you upgrade your machine. E.g less room
needed if you use freebsd-update (?)

> 
> > > 
> > > 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.
> 

Nothing wrong with your scheme, Jerry. Any slicing/partitioning scheme
has it's pros and cons though and it all depends on usage but I'd
still make / larger. What's a couple of gigs worth nowadays even on a
relatively small disk?

> ////jerry

Regards,

> 
> > 
> > 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
> > 

-- 

 Frank

 Contact info: http://www.shute.org.uk/misc/contact.html





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091229215333.GA39411>