The ever lasting story: hard disk partitioning

Oleksiy V. Khilkevich centericq at ukr.net
Tue Oct 24 20:55:39 UTC 2006


> 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



More information about the CRUX mailing list