Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have done a few Linux installation previously. So far, I think this disk partition scheme works the best for me.

  • / – 10GB
  • swap – 2 x RAM size
  • /home – rest

This is great for me while distro hopping. I can wipe the / partition easily and re-use the /home partition.

So what is your favourite disk partition scheme? Anyone using LVM (Logicial Volume Manager) in Ubuntu? Just want to collect more ideas for reference in future.

share|improve this question
    
This seems more like a discussion than a question. See askubuntu.com/faq#dontask –  N.N. Jul 19 '11 at 7:59
    
Thanks for the reminder. I didn't notice that post. –  JohanSJA Jul 19 '11 at 8:04
    
This might be useful: askubuntu.com/questions/247/… –  Jorge Castro Jul 19 '11 at 11:31
add comment

2 Answers

up vote 1 down vote accepted

There is no "best" partitioning scheme. It really depends on your usage. E.g. if you're running a MySQL database, you might want to create a dedicated /var/lib/mysql partition for it.

10GB swap seems excessive and only useful if you need hibernation. 1xRAM + 2GB = 7G looks enough to me. The 2GB is actually used for swapping. You can lower it even more if you do not need swapping.

I've considered LVM for a regular system, but it's not worth it. Even if you can save space by it (by increasing/ decreasing logical volumes), recovery on mechanical failure/ power loss/ crash may be harder. If you've a big disk which will be unused for the big part, stay away from LVM since you do not need the extra space.

The only reason why you want to use LVM is in conjunction with LUKS (cryptsetup; a way to encrypt a partition). Since a LVM partition can hold more partitions, it'd save you from entering a passphrase for each partition because one LVM partition is encrypted, not the logical partitions in it. Of course, this advantage will only be available if you've a setup like "disk - LUKS - LVM - partition" and not "disk - LVM - LUKS - partition".

share|improve this answer
    
Haha. I think you misunderstand my representation (10GB for /, 2xRAM size for swap, the rest for /home). Anyway, thanks for the feedback on LVM. –  JohanSJA Jul 19 '11 at 8:18
    
@JohanSJA: at first I indeed misunderstood you on 10GB /; 2xRAM. However, my point stands that twice your RAM as swap is unnecessary. If I had to have a swap size of twice my RAM, then I'd need 16GB swap. On a 80GB SSD, that's a pretty big part so I disabled swap altogether since I've no need for hibernation. –  Lekensteyn Jul 19 '11 at 9:15
    
I am using Ubuntu on a laptop so hibernation might be a requirement. With a 4GB RAM, how much should I allocate for SWAP then? –  JohanSJA Jul 19 '11 at 9:38
    
@JohanSJA: I'm using a laptop too and use to suspend (to RAM). If you've spare disk space, any value greater than 6GB would suffice. If you've low disk space, 5-6GB would be sufficient. Again, it really depends on your needs. If you do heavy image editing using GIMP or other memory-intensive tasks, a bigger swap allows Ubuntu to stay working even if the RAM gets full. There is no definitive number and if you're frequently hitting your swap I recommend you to buy some extra RAM so you do not have to worry about it. –  Lekensteyn Jul 19 '11 at 14:15
add comment

When running multiple distributions and/or frequently changing them, or otherwise frequently manipulating partitions, I recommend LVM. See the wiki entry on the subject.

share|improve this answer
add comment

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.