Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there some kind of "best disk partitioning scheme" for a Linux-based web and application developer machine, in terms of performance, organization or others?

share|improve this question
    
Disk partitioning for Linux or Windows? What kind of developer? Programmer, web-designer,... –  Miro May 1 '12 at 16:57
    
i've edited the question. thanks. –  pzanetti631 May 1 '12 at 16:59
6  
Why would being a developer affect your partitioning scheme? How do you even define "best"? –  Michael Mrozek May 1 '12 at 17:08

4 Answers 4

up vote 3 down vote accepted

Partitioning doesn't affects performance so much, but file systems and its configuration affects perfomance yes. Look at this benchmark. Little information about mounting options - fstab, especially look at atime options.

Partitioning has nothing with organization files in Linux, because in Linux is everything mounted into one tree.

I recommend one partition for system - / and separate partitions for folders where you place your work and personal data: /home and /var/www if you put your websites here, because if you change distro you will no need to do backup.

share|improve this answer

At a minumum, I'd do:

1 partion for / 1 partition for /home (this would be most of the space)

share|improve this answer
    
is this the best approach? ;) –  pzanetti631 May 1 '12 at 17:02
    
For a dev-machine it is the approach which is the simplest. It divides up into system-space and dev-space. –  Nils May 1 '12 at 19:43

On our internal developement virtual machines we use three partitions:

  1. /root partition - housing mostly static operating system stuff

  2. /var partition - for all dynamic data

  3. /home partition - this is where development takes place with the user accounts of the developers

The reason to separate the partitions is to avoid a system halt due to full filesystem. If /home is full - does not matter. No running processes are affected. Delete something, enlarge online and continue.

/ should not change much (the only exception is /tmp - but files there are usually never big).

/var is the place where /var/tmp and all other "live" data resides (including /var/log). A full /var/log is still the number one reason for system/application failures, so /var has to be big enough and there has to be a warning in time when space is becoming sparse there...

On physical machines, where disk space does not matter that much, we divide up additional "partitions" (mostly LVs), including: /var, /var/tmp, /var/log, /tmp, /boot, ... but these are production machines, where uptime matters.

share|improve this answer

I used to make separate partitions for /, /home, /usr/local and /var, but I always seemed to end up with some sort of interactions across partitions. If I did install a different distro, I would want to have the unused dotfiles removed for simplicity, so I still made a backup and wiped /home.

As for making a /var partition, I made so many sites at school (~100 or so), with such a large variance in sizes between media heavy sites and text only exercises, that it was impossible for me to accurately estimate the amount of space to allocate.

Now, I just have one partition for everything, and I don't come anywhere near filling it up. Personal media (movies, games, shows) go on an external HD, so that I can take it to a friend's house. For virtual machines, which have to be virtual appliances in virtualbox if you want to move them, I like to have a dedicated flash drive for each one.

I've never seen a HD crash, but if it did, I don't think it would matter how the physical drive was partitioned; it would just be dead. The riskiest thing I've ever done with my HD is resizing partitions, which is no longer necessary.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.