How should I divvy up my HDDs? Suggestions Please.

freebsd.org at donnacha.com freebsd.org at donnacha.com
Thu May 5 09:13:10 PDT 2005


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




More information about the freebsd-questions mailing list