Ehlo Usually I don't really care about hard disk partitioning, because most of my computers are just workstations. One big /, a swap partition and sometimes a small /boot partition. However, now I want to install a server and I'm not quite sure my partition scheme is chosen wisely: /boot <- 25 mb swap <- 1 GB (server has 1 gb ram) / <- 2 GB /usr/local <- 500 MB /home <- The rest Point of /usr/local is for all custom compiled software (not the packages from the CRUX repositories). Now this all looks good, but there are 2 problems with this setup: 1) /var is on the root volume (/), which is 2 GB in size. Ofcourse, when the system is under attack or some other reason /var fills up, my / is full and this could lead to a dangerous situation (not being able to log in anymore). Also the logs are on the same volume. Would it be wise to create under /home for example /home/system/logs and let /var/log be a symlink to that? 2) /tmp can fill up too. I would consider mounting /tmp with tmpfs, 512 MB in size, is that enough for server purposes? (Web/mail/general purpose) Thanks for your advice. Glenn
/boot <- 25 mb swap <- 1 GB (server has 1 gb ram) / <- 2 GB /usr/local <- 500 MB /home <- The rest
1) /var is on the root volume (/), which is 2 GB in size. Ofcourse, when the system is under attack or some other reason /var fills up, my / is full and this could lead to a dangerous situation (not being able to log in anymore). Also the logs are on the same volume. Would it be wise to create under /home for example /home/system/logs and let /var/log be a symlink to that?
2) /tmp can fill up too. I would consider mounting /tmp with tmpfs, 512 MB in size, is that enough for server purposes? (Web/mail/general purpose)
I would definitely recommend that you break out /var and /tmp to be their own partitions. --Matt
/boot <- 25 mb swap <- 1 GB (server has 1 gb ram) / <- 2 GB /usr/local <- 500 MB /home <- The rest
I'd make / a bit bigger. If you keep a couple of kernel source trees going at any one time you'll find you start needing to trim them down. if you've only got 2 gb to play with. My latest kernel tree is using 352M so if you keep a couple of trees going you'll use a lot of space. I'm assuming you've got a fairly large drive so make / about 4 gb. HTH, Joe
Ehlo Hi, RedShift!
/boot <- 25 mb swap <- 1 GB (server has 1 gb ram) / <- 2 GB /usr/local <- 500 MB /home <- The rest
Well, I see no point in creating a separate /boot partition, I'd rather put /boot onto a root partition (of course, you may have reasons to not do that), since stuff in /boot is usually as important as in /etc, /lib/modules/<blah>, and so on. The good advise from me is to be generous on such volumes as /tmp and /var, so you would not in one unsuitable moment run into out-of-space trouble. It's easier to lay some redundancy from the start rather than to have a headache, what to delete/move in the future. The typical scheme I use (both on home ws and servers) is the following: / 512M is plenty (256 megs should be enough cases, usually about 160 or less is used ) The stuff here is rarely changing in a production period. /usr 6G, with maximum realistic installation you'll get about 4G used and 2 gigs for stuff in /usr/local and /usr/src The separate partition is needed to guarantee that in case of filling it fully, your system will operate properly (very important in light of the recent permissions holes in kernel sources) You'll just need to make some cleanup. If you control the disk usage pretty tough, you may not make it separate but merge with root /. /tmp 1 or 2G, depending on tasks performed on a server (like storing temporary stuff downloaded from the Net or CDs to burn :P, usefull for building packages also) /var 1 or 2G, depending on how much preinstalled stuff will go there (for example ldap/mysql/postgresql DBs) /srv Here I store all server-side stuff, symlinking it from /var where needed. The case where symlinking is better than a sex with configuration files is apache, as many ports rely on the standard location of htdocs. I often symlink /home to /srv/home also if no special cases The size depends on what you'll put here. I usually give all free space on the HDD left from partitioning. The swap space you mentioned should be enough. Of course it depends on what kind of services you'll run :)
1) /var is on the root volume (/), which is 2 GB in size. Ofcourse, when the system is under attack or some other reason /var fills up, so make a separate partition for /var.
2) /tmp can fill up too. I would consider mounting /tmp with tmpfs, 512 MB in size, is that enough for server purposes? (Web/mail/general purpose) Again, it's not that dangerous if you have /tmp separated from important stuff.
The above just represents what I used for about last 2 years. Feel free to ignore me or ask any questions Hopefully I wasn't too boring for you and others in ML. :) -- Oleksiy
participants (4)
-
Joe Gilmour
-
Matt Rowley
-
Oleksiy V. Khilkevich
-
RedShift