From owner-freebsd-questions Sat Jan 12 22: 2:45 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail4.nc.rr.com (fe4.southeast.rr.com [24.93.67.51]) by hub.freebsd.org (Postfix) with ESMTP id C6AB637B402 for ; Sat, 12 Jan 2002 22:02:38 -0800 (PST) Received: from there ([66.57.85.154]) by mail4.nc.rr.com with Microsoft SMTPSVC(5.5.1877.687.68); Sun, 13 Jan 2002 01:02:34 -0500 Content-Type: text/plain; charset="iso-8859-1" From: Brian T.Schellenberger To: "Mike Meyer" , "F.Xavier Noria" Subject: Re: Advice on creating partitions Date: Sun, 13 Jan 2002 01:02:16 -0500 X-Mailer: KMail [version 1.3] Cc: questions@FreeBSD.ORG References: <15424.22574.995107.46777@guru.mired.org> In-Reply-To: <15424.22574.995107.46777@guru.mired.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: <055673402060d12FE4@mail4.nc.rr.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Saturday 12 January 2002 10:37 am, Mike Meyer wrote: > F.Xavier Noria types: > > I've got a new computer with RAM 256 DDR and 21GB of its hard disk > > reserved for FreeBSD. > > > > I have no clue about what partitions should I create and what size > > should they have since in previous installations I just followed the > > 3xRAM rule for swap and the rest was under /. > > This comes up a lot, and there are lots of opinions. BTW, the rule for > swap is 2xRAM, not 3x. The other two numbers to consider for swap are > 0, if you don't think you'll ever swap and don't want kernel dumps if > you crash, and RAM + 64K if you want kernel dumps. If you're going to > run a lightweight windowing enviroment and aren't going to do any > graphics processing, no swap might be a reasonable answer. If you're > going to put /tmp on an mfs file system, you'll have to provide room > for that as well. FWIW, I find it useful to have a small, but non-zero amount of swap for one simple reason: If netscape or some other app goes nuts and starts allocating memory in an insane manner, it slows the system down. I run xosview all the time and with no swap, I watch helplessly as the metter just zooms to the right and then the system comes crashing all around me dying of memory starvation. If there's swap, it gives me enough time, if I'm on the ball, to kill the naugty process or at the very least to CTL-ALT-BACKSPACE and just kill the X processes without clobbering everything else. YMMV. > > > This is going to be an average desktop computer, for playing around, > > programming and so forth. After reading the relevant parts of the > > Handbook and "The Complete FreeBSD", I've come with this temptative > > settings: > > > > / 200MB > > swap 800MB > > /var 300MB + SoftUpdates > > /usr + SoftUpdates > > > > and /tmp would be symlinked to /usr/tmp to make sure I do not run out of > > space there (is that reason reasonable in fact?). I don't need to be > > conservative because I have a lot of room, would you think those are > > suitable partitions? > > Here's something to take into consideration when doing such things: > splitting a file system into two file systems replaces one thing that > can run out of space with two such things, making it twice as likely > that you'll run out of space. Therefore, you want as few file systems > as you can get away with. > > Which leaves the question: why create more than one file system? The > answer is because you want to handle them differently with tools that > act on entire file systems. Those are things like mount, nfs, dump, > and newfs. Note that I said file systems, not partitions. Swap doesn't > use a file system, but needs it's own partition. I'm going to ignore > it from here on out. > > If you're not going to back things up or do any nfs mounts, then I'd > recommend two file systems: / at about 4GB, and everything else as > /home. The reason for that is that you can newfs / and do a fresh > install of a newer system without destroying your personal data. > > If you want to back up critical things, but not do nfs, I'd make it > three partitions: / at 100 MB or so, /usr at ~4GB, and /home as the > rest. You can then dump /, which will have all the critical system > configuration information plus any oustanding mail, etc. stuff on > it, and /home. What's on /usr can be recreated from things on the > network and the stuff backed up with /. > > If you want to mount / read-only for extra security, you'll need to > split /var off from /. 100MB is more than enough for /var doing the > things you've mentioned. You don't need to split /usr off from it, but > will probably want to so that you can install ports and the like > without having to reboot to single user mode. > > Free Dmitry Sklyarov! (let him go home) <----------- http://www.eff.org http://www.programming-freedom.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message