Ubuntu 9.10 Server (minimal virtual machine) partitioning

Posted on

Ubuntu 9.10 Server (minimal virtual machine) partitioning – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, ubuntu, partition, , .

I am setting up a generic Ubuntu server and am trying to figure out the (best) way to partition the machine. Again, this is just a generic one:

The default drive is 20GB.

Some guides show:
Separate /home, /usr, /var and /tmp partitions

Another one suggested something like this:
/ 4GB
/boot 512MB
/tmp 1GB
/home 5GB
/usr 5GB
/var 5GB

What is the best way to accomplish this?

Solution :

Before this gets migrated, a quick answer: I would need a very good reason to partition something as small as a 20GB drive at all. Just use one big / partition unless you have some very specific usage pattern in mind that you haven’t told us about.

Partitioning something this small only leads to nightmares: /boot to small, so kernel upgrades fail… /tmp too small, so you get random crashes… /home too small, so users become unhappy… And it’s very hard to tell up front what the right sizes should be.

If it was up to me i would partition it all into one big partition mounted to / Slicing up the little 20 GB you have available will lead to problems or just makes things difficult for you in the future.

If you think you will install a new OS quite often in the future you can consider making /home into a seperate partition. During future reinstalls you can just use the same /home and everything will be there allready.

As others have suggested, splitting up 20Gb might be troublesome. It does have advantages though, particularly keeping /home and /tmp separate so running out of space on one doesn’t affect elsewhere.

I suggest keeping the drive as one partition, and using LVM to split thing up. That way it is relatively easy to rearrange later if you find you made something too small. Leave a small amount unallocated so that you have a quick resize option for an emergency – you can increase the size of a logical volume and resize the filesystem on it while the system is live (assuming the chosen filesystem and tools support this – I’ve done it with ext3). This alleviates the pressure of having to get the choice exactly right in such a small place (you just need to get it “right enough for now”), and gives you an easy upgrade option too: if you find a VM needs more space rather than just rearranging the existing allocation you can ad a second vdisk (you’ll need to down the VM for this part), mark it as a pv for lvm, add it to the main volume group, and can then expend volumes into it (all this can be done live).

There is a small performance hit with LVM in many cases as you are adding an extra level of indirection to disk access but this is generally very small, so small as to not be noticeable and well worth the extra convenience LVM can offer.

Leave a Reply

Your email address will not be published. Required fields are marked *