Recommend a partitioning setup

I just got a new hard drive and want to install everything from scratch. This gives me the opportunity to set up an entirely new, more optimal partitioning of the drive. I am planning to install Opensuse 11.1, windows vista, and probably one other linux. I also plan to use GPT since my system seems to support it, so I do not need to worry about extended partitions. I have 320 gb and 4 gb RAM. I plan to allocate 30 gb to vista, 30 gb each to root of the two linuxes, whatever is good for swap, and the rest to /home.

So I have several questions:

  1. Should I have any other folders be stored on separate partitions? For instance /boot or /var? If so how much space should I allocate to each?

  2. Are there any of these partitions besides /home that can be safely shared between two Linux distributions? I plan to have separate home folders for the two distribution, with some of the directories hard linked between the two.

  3. Given the above information, what would be the best ordering of the partitions on the drive to maximize speed? I am not going to fill up the home directory very quickly, so far it only takes about 60 gb and I should have around 200 when all is done.

  1. Separate /boot is not necessary these days except with very old BIOSes and some special setups. Separate /var only makes sense if you have a lot of MySQL DBs or your machine is a mail server and the mail spools are in /var (they would be in /home if you use maildir format), or some other large use of /var. Or you could put the MySQL data directory in /home and symlink from /var. A separate /srv might make sense if you have a lot of web server files, or you could change DocumentRoot. Media files I assume you would keep in /home. A lot means an amount that would be a large proportion of /'s size, not casual usage.

  2. swap can be shared. You probably don’t need swap with 4GB RAM, but you might have one since 8GB is cheap. You could use a swapfile instead of a swap partition if you prefer. BTW you can’t hard link directories, only symlink them.

  3. Generally put the most used partition near the middle. The effect is likely to be small, given Linux’s excellent caching and the large amount of RAM you have.

Thanks! Which partitions are the ones that are going to be used the most? Which is used more, the /home partition, root partition, or swap partition? Which is used the second most?

This depends completely on what you do with the machine, but since I noticed that there’s hardly any difference anymore on linux systems, I don’t realy bother. I would on a webserver though
On my system, /home is the most heavily used.

swap is probably seldom used since you have a lot of RAM.

You can install the package sysstat which has the program iostat that will show you how much traffic each partition gets. In my case /home has more traffic because I’m using a small set of programs most of the time. Your usage may differ.

I would recommend a separate /boot of about 100MB and then create an LVM managed partition. This will give you insanely more flexibility in the future for disk upgrades as well as changing space allocations.

I personally like this setup:

/boot 100MB
/ 5GB
/var 7GB
/usr 7GB
/tmp 2GB
swap 2GB
/srv (Depends)
/home (at least half the disk)

However, you need only create 2 partitions as you should not have /boot on the LVM managed partition, and then just a single LVM partition which then creates the file systems mentioned above

With LVM you have the option of extending the filesystems, or adding disks to continue expansion. Should you start with say a single 250GB drive and then purchase an additional 750GB drive, you can add them together as part of a concatenation and expand file systems onto the other drive transparently. As well, you can migrate your logical volumes (the LVM equivalent of partitions) to the other drive and then remove the 250GB, and so forth.