From owner-freebsd-questions@FreeBSD.ORG Thu May 5 16:13:10 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0BC216A4CE for ; Thu, 5 May 2005 16:13:10 +0000 (GMT) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D85843D9A for ; Thu, 5 May 2005 16:13:10 +0000 (GMT) (envelope-from d@donnacha.com) Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id F3546C8996A; Thu, 5 May 2005 12:13:07 -0400 (EDT) X-Sasl-enc: QN/ejPT4uNpWksywlHrmWx7zSeIubIOaYVdKXzysoM1V 1115309586 Received: from [127.0.0.1] (82-41-213-217.cable.ubr12.edin.blueyonder.co.uk [82.41.213.217]) by frontend3.messagingengine.com (Postfix) with ESMTP id 201C788; Thu, 5 May 2005 12:13:06 -0400 (EDT) Message-ID: <427A4658.3010806@donnacha.com> Date: Thu, 05 May 2005 17:14:16 +0100 From: freebsd.org@donnacha.com User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <200505051256.j45Cu2rM009492@clunix.cl.msu.edu> <427A1ED5.9050507@donnacha.com> <200505050955120728.22A9DCBB@mail.intradyn.com> In-Reply-To: <200505050955120728.22A9DCBB@mail.intradyn.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: Henry Miller Subject: Re: How should I divvy up my HDDs? Suggestions Please. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2005 16:13:10 -0000 Hi Henry, thanks for your advice. > It occurs to me that you are on the wrong track asking here. Ask > people who run a forum about as big as you think yours can get how big > the database is, and how big the templates are. If their database is > 150Gb, then you should dedicate one disk for database (that is > /var/db/postgressql is a separate partition that takes the entire 200Gb > Disk), than start saving for a RAID system to replace that disk because > it will fill up! Well, most of the forum admins who are active in the forum-management forums seem to use Linux. I've had my own experience of RedHat kernal Hell, so, I'm opting for FreeBSD because I have a hunch that it will be more reliable and easier to scale as my business expands. Although, yes, they have more experience running forums, I figured that it would be better to get FreeBSD-specific advice here. > Well you can place databases anywhere you want. If they are very big > you would want a external RAID to place them on, though that is > overkill for most forums. However make sure you make /var a big > partition if you place them there. You are right that the database > will be far more space than the templates. At the moment an external RAID is way, way beyond my means, that's something I might graduate to if these forums of mine take off! > Although in general splitting swap is a good idea, I wouldn't. By > putting swap all on one disk, and the web pages on the other you can > split the load a little (with 2GB of RAM you shouldn't be swapping > much anyway) There might be other ways to split the load. That's a REALLY interesting take on Swap. How would this work out for load balance: /, /tmp and 8gb of Swap all on the 80GB, while I put /home, /usr and my massive /var on the 200GB? Or should I shift /home or /usr over to the first HDD too? > This assumes that you won't have many local users, you are not also > running as a fileserver, and your few local users won't have big files > around. Yeah, that's correct. > Yes it is difficult to change partitions latter. you have to backup > everything, change, re-install, then restore. Lots of down time. Hmm, that makes me wonder if it might not make sense to follow Greg Lehey's suggestion and lump the web pages into /var alongside the database data. That way, I can create one big partition and not have to guesstimate how much space either type of data will require. Then again, I'd lose the ability to chroot and/or jail the web server as you suggested. Hmmm, decisions, decisions!! Donnacha Henry Miller wrote: > On 5/5/2005 at 14:25 freebsd.org@donnacha.com wrote: > > >>Jerry, thanks for your advice! >> >> >>>If all your accounts and web pages >>>are really in /home and you have no databases, I would be inclined >>>to put both /usr and /var in the 80GB drive and leave the other one >>>for home directories and web pages. >> >>In The Complete FreeBSD, Greg Lehey suggests that it's a good idea to >>place web pages in /var, I don't quite grasp why. Do you think it > > would > >>be a better idea to stick with the standard and leave web pages in > > /home? > > If you web pages are all in one location you can chroot and/or jail the > web server, which increases security. > > >>As for databases, I'll have a lot of MySQL DBs and possibly, at a > > later > >>date, Postgresql. I'm hoping to specialize in forum-based web-sites > > and > >>Web apps generally. As I understand it, forum content is actually >>stored in the DB and pulled dynamically via PHP, meaning, I think, > > that > >>the DB of each forum will take up a lot more space that the templated >>PHP pages that make up the "site" part of the equation. I could be >>wrong about that. > > > Well you can place databases anywhere you want. If they are very big > you would want a external RAID to place them on, though that is > overkill for most forums. However make sure you make /var a big > partition if you place them there. You are right that the database > will be far more space than the templates. > > >>What about /tmp? Looking through this list's archives, I read that > > it's > >>considered more secure to place /tmp on a seperate partition from /, >>would it be even more secure to place it on a seperate HDD? How big >>should /tmp be? > > > Not really. The big advantage of separating things is /tmp is written > fairly often, the rest of / is not. By putting /tmp on a different > partition you make it less likely that the / filesystem gets corrupted > if a reboot happens unexpectedly. Not as much of a problem now that > we have softupdates, but even still you can limit the damage from > crashes (including the power going out) by putting / elsewhere. > > Considering your usage, I would either make a big RAID-5 system (you > need at least 3 physical disks of the same size for this), or place > /var on a separate big disk entirely its own. reason: most of your > disk access with be to /var (web pages and database) > > Although in general splitting swap is a good idea, I wouldn't. By > putting swap all on one disk, and the web pages on the other you can > split the load a little (with 2GB of RAM you shouldn't be swapping > much anyway) There might be other ways to split the load. > > This assumes that you won't have many local users, you are not also > running as a fileserver, and your few local users won't have big files > around. If this is not true then you need a different partition > scheme. > > It occurs to me that you are on the wrong track asking here. Ask > people who run a forum about as big as you think yours can get how big > the database is, and how big the templates are. If their database is > 150Gb, then you should dedicate one disk for database (that is > /var/db/postgressql is a separate partition that takes the entire 200Gb > Disk), than start saving for a RAID system to replace that disk because > it will fill up! > > Only you can guess how things will happen on this system, so you have > to decide for yourself how to do thing. > > >>Here's a pretty stupid question I have, apologies for my lack of clue: > > >>do I have to define the size of each partition? Is it difficult to >>change them at a later date? I'll only have command-line access. > > > Yes it is difficult to change partitions latter. you have to backup > everything, change, re-install, then restore. Lots of down time. > > >