|
FreeBSD Installation and Upgrading Installing and upgrading FreeBSD. |
|
Thread Tools | Display Modes |
|
|
|||
freebsd 7 installation partition size for 250gb harddrive
what would be ideal partition size for freebsd7 runing on a 250gb hardrive.
The server would be runing apache php and mysql and runing some busy sites with 100000 plus members. Particularly what should be the size of /var also of particularly interest would be what would be good sizes to use for /tmp /root etc as disc space I donot this is going to be a problem will be leaving most of the remaining space for /usr thanks
__________________
Freebsd 7 64 bit apache2.2 php5 mysql5 |
|
||||
There is no ideal.
I have 250GBas well Code:
Swap 4GB (i got 2GB ram) / 256MB /home, everything left /usr 10GB, can be smaller (perhaps 7GB), i'll probably resize it later, and make /bak slice :) /var 512MB My last setup used some 5-6GB /usr Note that you may need to make workarounds for some packages to compile, if you use small /usr, but that's very easy to do.. http://daemonforums.org/showthread.php?t=1241#post8963 Edit: Forgot to mention, that i use FreeBSD 7 as my desktop OS, if you will use it as Server os, then you will need way bigger /var.... and something different probably Last edited by graudeejs; 21st July 2008 at 02:52 PM. |
|
|||
/usr
i have my home directory in /usr
i have it as something like /usr/local/home so after allocating 50 gb to /var the Swap 4GB / 256Mb THe rest I allocate to /usr. I hope having the home directory in /usr is not going to cause any performance hits.
__________________
Freebsd 7 64 bit apache2.2 php5 mysql5 |
|
|||
50gb for var
infact I have 100 gb for /var :-)
have 750gb disc space and big databases
__________________
Freebsd 7 64 bit apache2.2 php5 mysql5 |
|
||||
Quote:
By default 8% of allocated space is 'reserved' and you really do not wan to cut FreeBSD file systems down to the wire: not enough free space == reduced performance. Since you've got a lot of room, planning to have 15% margin for performance reasons, plus 40~50% of the remaining disk space free on your partitions in case of surges in required space probably wouldn't be a bad idea. The size of / needs to be large enough for your needs, remember every thing not moved onto another 'mount' is stored on /; my laptop runs 512mb / without problems but I *have* filled it to the brim on occasion. The size of /tmp should be able to hold the largest files you intend to place there, for example I often extract backups in /tmp/SomePrivateDir or /root -- which ever offers more space. I would suggest a /usr partition of at least 2GB in order to handle the load of /usr and associated files. Remember /usr/ports, /usr/obj, /usr/src and /usr/local are stored on it. The standard contents of /usr alone should consume around 500~600MB not counting the aforementioned directories. Assuming your storing the websites files in /var, you need it to be _at least_ big enough to hold all of your sites files and their databases. Loving margin for error, something like: (disk quota + database quota) * 1.7. would probably be suitable. The greater margins are always helpful and can cause less trouble later when todays constants (e..g sites * quota) change to tomorrows over time spent fixing it ;-). You can off load most parts of the file system at will, for example you could mount /usr/ read only, then mount another partition on it read write as /usr/ports. (I've never tried this but I see no reason why it should not work!). If you have disk space, you can always create a small partition for a /home and make /usr/home a symlink to it. My file server has like a 400MB partition for /home, just enough free space that I can store larger files their in a 'pinch' without (as much of) the freedom for an attacker to bloat free space on /usr should the account be compromised ;-) DISCLAIMER: I am not a professional user of FreeBSD, just my families computer geek.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
hi.
Thanks for your clear explanation... really it helps me lot.. hats of to u could u send me some links to learn more |
|
|||
Remember that dump and restore work on partitions. So separate the system software, the server applications software and the user data by giving each a separate partition.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
my partition sizes
thanks for all the help. This is what I went for in the end
Code:
Size Used Avail Capacity Mounted on 19G 197M 18G 1% / 1.0K 1.0K 0B 100% /dev 7.7G 14K 7.1G 0% /tmp 545G 998M 500G 0% /usr 97G 102M 89G 0% /var hope you all agree
__________________
Freebsd 7 64 bit apache2.2 php5 mysql5 |
|
|||
Your root partition is way too big. The remaining18 GB will never be used
Code:
Size Used Avail Capacity Mounted on 19G 197M 18G 1% / For a server it is also recommended to have a separate partitions for //var/log and /var/tmp. If you offer mail facilities to your users you also need a separate /var/mail. And you are ignoring my advice to separate the base system, application and user generated data.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
thanks for the replies
hi J65nko thanks for the help.
I would be grateful if you could put down your optimal partitions for a 750 gb harddrive. Also could you elaborate on Code:
So separate the system software, the server applications software and the user data by giving each a separate partition.
__________________
Freebsd 7 64 bit apache2.2 php5 mysql5 |
|
|||
Without more detailed information which applications you use and exactly how the data for your users is being stored me. nor anybody else will be able to to give you an optimal suggestion Actually you should be able to get that info from your current server.
According to the FreeBSD hier(7) man page, programs installed from the ports system are installed in /usr/local. So by creating a separate filesystem for /usr/local you will separate your applications from the remainder of the system. Rationale: a problematic port upgrade from one of your applications can now be easily fixed by restoring the previous version from backup. If your data for your 10000 users is being stored in MySQL tables/databases somewhere under /var, then create a separate partition for those tables. Same for the mail. Rationale: you don't want a massive spam attack (delivered to /var/mail) completely fill up your /var partition and thus denying your users to store their data in your MySQL databases located in the same /var partition. Or the other way around
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
Quote:
Quote:
For disc geometry I thought the below links were the best to get a quick overview. http://library.thinkquest.org/C00620...arddrives3.php http://www.pcguide.com/ref/hdd/geom/tracks.htm when I run swapinfo I get the below. Code:
Device 1K-blocks Used Avail Capacity /dev/ad2s1b 8388608 0 8388608 0% here is output of df -h Code:
Filesystem Size Used Avail Capacity Mounted on /dev/ad2s1a 19G 197M 18G 1% / devfs 1.0K 1.0K 0B 100% /dev /dev/ad2s1e 7.7G 14K 7.1G 0% /tmp /dev/ad2s1f 545G 998M 500G 0% /usr /dev/ad2s1d 97G 103M 89G 0% /var dmesg | grep -e "ad[0-9]:" Code:
ad2: 715403MB <Seagate ST3750640AS 3.AAE> at ata1-master SATA150 thanks for the help. answered one question myself after a lot of googling. Code:
devfs 1.0K 1.0K 0B 100% /dev http://www.fdcservers.net/vbulletin/...read.php?t=494
__________________
Freebsd 7 64 bit apache2.2 php5 mysql5 Last edited by ijk; 27th July 2008 at 05:48 PM. |
|
||||
devfs and procfs's basically are managed in memory by the kernel, it ain't a "formal" file system.
>the only bsd partition with 8GB is the tmp drive. does this mean no swap drive was created ? I don't quite understand what you mean, because you just listed the contents of a swap partition above that text.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
|||
Quote:
The below is the swap drive. thanks to you just notice the ad2s1b b at the end so a different partition. Code:
Device 1K-blocks Used Avail Capacity /dev/ad2s1b 8388608 0 8388608 0% I take it all the below are bsdpartitions and not slices. Code:
ad2s1a ad2s1b ad2s1e ad2s1f ad2s1d Now the sysadmin who installed freebsd on myserver would he have any sane reason to give me a swap drive of 8gb when I have ram of 8gb. The normal norm is to have x2 or x3 the amount of ram you have. As always your help is greatly appreciated thank you
__________________
Freebsd 7 64 bit apache2.2 php5 mysql5 Last edited by ijk; 27th July 2008 at 07:35 PM. |
|
||||
The discussion of what sice swap space is needed on a server, is most defiantly one I'll keep my head out of for any system beyond my personal control.
The only time I've had problems with FreeBSD detecting a machine with only 1 disk as anything >0, is my test machines SATA drive. Where the 'ATA_STATIC_ID' option in FreeBSDs GENERIC kernel configuration usually causes the machines lone hard drive to be detected as ad4, instead of ad0. A lot of people here have used FreeBSD longer then I have and on much more varied system configurations, maybe someone might have an idea? The disk notation used on FreeBSD is very simple, Code:
[driver name] [disk number] s[slice number] [[partition letter]] So, using 'ad2s1b' as an example for the above notation. 'ad' is the driver name, '2' is the disk number, 's1' is the slice number, and 'b' is the partition letter. By convention some of the letters used for denoting partitions have special meanings on some systems. 'a' on the boot disk => /, 'b' => swap, 'c' => the entire slice, e.g. ad2s1c is equal to ad2s1 and all partitions within slice 1's label, in meaning that is. You can find more details in the FreeBSD handbook and manual pages for bsdlabel. FreeBSD is also fairly consistent in its device naming practices.
__________________
My Journal Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''. |
|
||||
feedback please
Now after doing a bit of research and all your fantastic feedback I have decided on the below partitions for my 750 GB hardrive . And few questions still remain but here goes.
/ = 2gb Quote:
Quote:
/usr = 30gb Quote:
Quote:
/var/mail = 20gb /var = 100gb /home = remaining . The plan is to host the websites files from the home directory so will need the most space as log of images file etc. Questions: 1] /usr = 30gb is it better to give /usr/local =20gb and /usr = 30 gb or just have /usr = 30 gb 2] would it be better to create another directory say /www for the sites I will be hosting ? was thinking of putting them in /home as a subdirectory. There is just going to be one user. 3] /var/mail = 20gb is that enough for a moderately busy website. what would be the size of /var/mail of a typical mailserver. Anything else you think I should be doing would be most grateful for your help thank you. List of links I felt were useful. http://www.freebsd.org/cgi/man.cgi?q...SE&format=html http://www.vmunix.com/fbsd-book/install.phtml http://www.raiden.net/?cat=2&aid=291&pid=2 http://www.freebsd.org/cgi/man.cgi?query=hier&sektion=7 http://groups.google.com/group/lucky...c0e3075befea76 http://lists.freebsd.org/pipermail/f...ry/073534.html
__________________
Freebsd 7 64 bit apache2.2 php5 mysql5 Last edited by ijk; 28th July 2008 at 01:28 PM. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
FBSD 7.2 installation not seeing partition table correctly | Mantazz | FreeBSD Installation and Upgrading | 0 | 2nd July 2009 11:36 AM |
Negative partition size? | giga | FreeBSD General | 1 | 2nd January 2009 09:02 PM |
freebsd 7 64 bit installation | ijk | FreeBSD Installation and Upgrading | 9 | 1st September 2008 03:16 AM |
Mounting a FreeBSD UFS partition | roddierod | Solaris | 1 | 7th August 2008 02:02 PM |
Resizing FreeBSD partition | Cloud | FreeBSD General | 3 | 28th June 2008 03:40 AM |