From owner-freebsd-questions@FreeBSD.ORG Tue Dec 29 17:30:37 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0773E106566C for ; Tue, 29 Dec 2009 17:30:37 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id B62298FC17 for ; Tue, 29 Dec 2009 17:30:36 +0000 (UTC) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id nBTHPqa5009947; Tue, 29 Dec 2009 12:25:52 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id nBTHPndY009946; Tue, 29 Dec 2009 12:25:49 -0500 (EST) (envelope-from jerrymc) Date: Tue, 29 Dec 2009 12:25:48 -0500 From: Jerry McAllister To: Kaya Saman , freebsd-questions@freebsd.org Message-ID: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091229162711.GA38738@orange.esperance-linux.co.uk> User-Agent: Mutt/1.4.2.2i Cc: Jerry McAllister Subject: Re: New user - small file server questions and quick GUI question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2009 17:30:37 -0000 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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"