Help - Search - Members - Calendar
Full Version: FreeBSD partitioning at servermatrix
The Planet Forums > Operating Systems > BSD
Jeff
What does the partitioning look like of a new FreeBSD server from servermatrix? Does it follow the default freebsd partitioning and sizing, or does servermatrix do like a compeititor and create one large / partition with everything in it?
Antipas
server# df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 126M 46M 70M 40% /
/dev/ad0s1f 252M 56K 232M 0% /tmp
/dev/ad0s1g 72G 10G 56G 15% /usr
/dev/ad0s1e 252M 41M 190M 18% /var
procfs 4.0K 4.0K 0B 100% /proc
server#
Jeff
Thanks Antipas - much appreciated.
GlobalPN
This is what we have:

1 GB for /
1 GB for /tmp
1 GB for /dev
1 GB for /proc
2 GB for /var

Rest To /usr
klaude
We usually go with default partitioning. If you want something special let us know on your order form and we'll accommodate. icon_smile.gif
Forever
After being a unix admin for so long, something I learned quickly not to make /var small.

best bet is to have /var included in your largest partition, not have have 2 total partitions

/swap
/


If you have to ask why, if var ever gets fille dup your system is basically useless, you cant even get in to clean it out. Well you can get on console and do some fixing, but chances are if you are reading this, you dont have console access. yes even with /var attached to the rest it could get full, but chances are much less, takes a lot more time to fill u p 40GB than it does 200MB

cheers!
delo-
FreeBSD is designed to run with a different slices for a reason. They allow you to first mount slices ( partitions ) with custom read only access or read / write / exe. Or remove certain perms from lets say exe from /tmp

A good default setup I use on my servers is the following.

# 4.x
/ 128mb
/SWAP 2.5 x your system ram. 1GB RAM = 2.5 GB swap enough room for a full system dump and overhead.
/tmp 128mb
/var/tmp 128mb
/var 3gb
/usr 5+gb
/home remainder

# 5.x Note the large root to take have extra room for the dynamic root file
# system of 5.x
/ 256mb
/SWAP 2.5 x your system ram. 1GB RAM = 2.5 GB swap enough room for a full system dump and overhead.
/tmp 128mb
/var/tmp 128mb
/var 3gb
/usr 5+gb
/home remainder

Having this setup allows you to use /var/tmp as a scratch disk for certain apps that do heavy read/write/delete. /tmp for temp storage that will be deleted at bootup. a SMALL root slice since you should never be storing ANYTHING but the OS system files on it.

A 5+ /usr slice to allow for a full ports tree and plenty of build area for large ports like java.1.4.2.p5-native or the buildworld.

/home remainder you can use this for /home/www/ or for user directories and other data.

You should never setup your FreeBSD systems the way Linux or other *nix's set them up. Having a large single / device will only lead to trouble since it will make it possilbe for you to fill the complete file system and crash the system or lock it up. Having the /tmp directory off the / slice is very important so that if a program that uses the /tmp directory decides to core it will not fill up your root slice / and cause many problems.

For more information about why not to use a single file system and when and when not to enable softupdates read the sections in the FreeBSD handbook and FAQ located on the http://www.freebsd.org site.


Thanks

Jeremy Suo-Anttila
Unix Systems Admin
Layeredtech.com
BSDnews.org
Devion
Hmm Iv problem read this wrong or not done something...

I have Cpanel on my box freebsd5.1

but i seem to only have 1 partition

/dev/ad0s1a 71G 1.9G 64G 3% /

Is there anything i missed that i havent done?
delo-
Yes whoever installed FreeBSD on your server is a linux admin and did it wrong. If anything they should have used the FreeBSD defaults or you can slice up the disk how I described it. I know it works with Cpanel since I have clients running FreeBSD 5.2 + Cpanel and my disk config.

-delo
Devion
Thanks delo-

I have opened some support tickets since im unix newbie icon_mrgreen.gif
The staff here are very helpful
delo-
Yes they can be VERY useful when you are behind them with a cattle prod. icon_twisted.gif
Devion
the support team did it icon_smile.gif

i have the right "slices" now Thanks all for the help

*note : This post is 2-3days older than it should be iv been very busy!!
GlobalPN
I am going through the same process as you. Brand new server just ordered. Somebody installed only one slice (linux) instead of the normal FreeBSD slices. Hopefully they can correct this little issue wink.gif
X-Istence
/ - 512 MB

-- This has to be painfully small, you are not supposed to store anything here anyways

/tmp - 1 GB

-- MySQL uses it to store temp data

/var - 10 GB

-- qmail comes here with it's queue, logs

swap - 2.5 X the ram.

-- If ram is 1024 MB i pick 4 - 5 GB of swap

/usr - Rest of drive

-- This is where /usr/home resides (It was there in the first FreeBSD i used, kinda stuck. /home is just a symlink to it icon_smile.gif) together with ports and all the ports that get installed


Note about /var filling up and not being able to login. That is false. I have several times had /var fill up, and was still able to login through SSH, remove some files, mostly Apache's log file before i moved it elsewhere, and then restart the offending deamons to free the inodes.
mmontgomery
Initial Freebsd installs by us should be installed using the specified partitioning scheme supplied by cpanel:

http://cpanel.net/install.html

Please alert us if this is overlooked on your install, and we will immediately correct this for you.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.