[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Question about hard disk partition strategy for debian



Lian Liming wrote:
>     I have 35 GB hard disk space for installing debian/ustable.I am a
> common linux user and would like to do some web programming that means
> I need X winodows with KDE and LAMP(linux, apache, mysql, php). To
> limit damage upon system crash and better use the hard disk space, I
> want to know something for the partition strategy.
>    
>     Which directories should I separate from the "/", should I
> separate "/usr", "/var", "/tmp", "/home".... ? And then, how many GBs
> should i give to these partitions?

First; the guided partitioning for "multi-user" systems in
debian/unstable is quite nice, so perhaps you just want to use that and
don't bother about all this... However; here follows what I have
self-learnt about partitioning; I don't claim this to be a complete set
of knowledge.

Always put /home in an own partition -- because then it makes things
simpler if you have to reinstall the operating system from scratch again
(i.e., you can keep your /home unmodified). For space, you should
probably "put all that is left" of the disk into this partition.

In the old days it was always a recomendation to put /var and /tmp in
their own partitions, because the short lifetime of the files residing
there would otherwise fragment the rest of the filesystem. I'm not sure
how applicable this is with modern filesystems. It is also nice to have
/var and /tmp in their own filesystems so you can mount them with
different sets of rights (e.g., nosuid, nodev) for higher security.

The biggest "gotcha" with Debian is that it wants quite much space in
/var since it uses that filesystem to cache downloaded packages, so I'd
say use at least 1 Gb for this. Probably a lot more (~ 5 Gb) if you are
also going to run a mailserver or are in the habit of making very large
printouts.

For /tmp you can probably manage with ~ 0.5 Gb. However, if you are in
the habit of often unpacking things or testing things in /tmp (I know I
am), then you might want to set aside more.

The reason to put /usr on an own partition would be that IF the
semi-frequent changes of this partition somehow would screw up the
filesystem, you could still bring your system up in a semi-useful state
using only / and repair things. But I wouldn't say this is a very common
problem today, so I belive it is okay to leave /usr in the / filesystem.
I'd set aside somewhere around 5-10 Gb for this, depending on how much
things you expect to install.

Some people I've talked to belive that for home computers it is better
to actually put /home in the /usr filesystem to help with space
management, because they both are of "unpredicatble size". However, then
you have to mess around with backups to preserve your /home when
reinstalling. AND you cannot harden the security by mounting /home
nosuid and nodev.

Hope this helps,
//Rickard



Reply to: