How should I divvy up my HDDs? Suggestions Please.
freebsd.org at donnacha.com
freebsd.org at donnacha.com
Thu May 5 08:17:16 PDT 2005
Thanks for taking the time to advise me Robert.
> Consider putting the databases (data, not code) in their own
> partition. That way they can be backed up, restored, and otherwise
> managed independantly of other system operations.
> The downside of this is you lose the ability to "borrow" space
> from a larger partition.
Is MySQL's code usually installed in /var, alongside the DB data?
If so, where would you suggest I instead place the code?
> As for swap: you've got 2gb ... now. Is there any chance
> you'll add more in the future? Then build the system with swap for
> that value.
Thanks, hadn't thought of that! Seeing as I have plenty of space, I'll
make it 4GB per HDD, having lots of swap can't hurt, can it?
> As always, spread it multiple spindles for better
> performance.
Does each disk have multiple spindles? Are they like platters? I am
aware that swap should be placed on the outer edge of each disk.
>> How big should /tmp be?
>
> This may be hard to determine. My workstation uses 18k /tmp on
> a 500mb / ... except when certain programs are running ("make
> buildworld"??). With that much space, you might want to consider:
> put /tmp under/, but leave unallocated space (100-500 mb) on the
> other drive that could be put into service if that proves
> insufficient.
Wow, I didn't realize I could get away with using so little space for
/tmp. I guess 1GB should cover it then, is that right?
> recreate the partition at the new size (using only contiguous
> space)
Okay, how about the following, leaving plenty of space for resizing
partitions at a later date:
80GB HDD:
/ = 30GB
swap = 4GB
free space = 46GB
200GB HDD:
/db (special partition for database data)= 50GB
/var = 50GB (may be a heavy-duty mail server at some stage)
/home = 30GB
/usr = 10GB
/tmp = 1GB
swap = 4GB
free space = 55GB
Does that make sense? Am I leaving enough free space to shift things
around at a later stage? Do some of my allocations seem disproportionate?
I might also use some of the free space on each disk to hold temporary
back-ups of the data on the other.
Thanks,
Donnacha
Robert Huff wrote:
> Hello:
>
>
>> 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.
>
>
> /var is intended for things with a moderate change rate, for
> example mail queues and system logs. (/tmp is for things with a
> high change rate.) It's also understood that if something is /var
> gets trashed in a crash, core system operations ought not to be
> adversely affected.
>
>
>> How big should /tmp be?
>
>
> This may be hard to determine. My workstation uses 18k /tmp on
> a 500mb / ... except when certain programs are running ("make
> buildworld"??). With that much space, you might want to consider:
> put /tmp under/, but leave unallocated space (100-500 mb) on the
> other drive that could be put into service if that proves
> insufficient.
>
>
>> 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.
>
>
> Consider putting the databases (data, not code) in their own
> partition. That way they can be backed up, restored, and otherwise
> managed independantly of other system operations.
> The downside of this is you lose the ability to "borrow" space
> from a larger partition.
>
>
>> Here's a pretty stupid question I have, apologies for my lack of
>> clue: do I have to define the size of each partition?
>
>
> Yes.
>
>
>> Is it difficult to change them at a later date?
>
>
> The only sanctioned way to change partition size is:
>
> unmount the partition
> back up the contents
> delete the partition
> recreate the partition at the new size (using only contiguous
> space)
> newfs the partition
> restors from backup
>
> If you need to add space to a otherwise functioning filesystem,
> and you have open positions on your IDE cables, look into using
> "ccd".
>
> As for swap: you've got 2gb ... now. Is there any chance
> you'll add more in the future? Then build the system with swap for
> that value. As always, spread it multiple spindles for better
> performance.
>
>
> Robert Huff
More information about the freebsd-questions
mailing list