LXC firewall logging and udev upgrade in Ubuntu

Today I’m going to write about a couple of major gotchas with LXC. Now these issues are documented in various places but I wanted to put all the relevant information together in one place to make it easier for people.

Before going any further it’s important to note that I created my LXC container with the official Ubuntu template from the latest “stable” LXC release i.e. I downloaded the tarball and put the template in the correct place as Ubuntu 10.04’s LXC package doesn’t contain said template. This helps minimise all sorts of problems especially ones related to the LXC console crashing and the like.

Firstly you will find when running “apt-get upgrade” (if you have Lucid updates enabled in /etc/apt/sources.list) that you get this error on upgrading udev:-

mknod: `/lib/udev/devices/ppp': Operation not permitted

Continue reading LXC firewall logging and udev upgrade in Ubuntu

Converting to GPT in Ubuntu

GPT stands for “GUID Partition Table” and it refers to a relatively new format for disk partition tables. It was designed to get around the limitations of the MBR format, namely that you can have more than 4 primary partitions and partitions can be more than 2.2 terabytes in size. GPT is part of the EFI standard but it can also be used on standard BIOS only machines i.e. most non-MAC PCs. Converting to GPT will allow you to future proof your partitions. 2 TB disks are becoming common and it won’t be long before the 2.2TB limit of MBR will stop people using all their disk space in one partition, so in the name of usability and flexibility GPT is the way forward.

Continue reading Converting to GPT in Ubuntu

Partition alignment largely a moot point now

To summarise. It is very important for recent disk performance that partitions are aligned on a 1MB/2048 sector boundary. This stops data from sitting astride blocks and killing disk performance. It is especially important with first generation SSDs, as they have poor write performance anyway, and will save your SSD from an early demise (flash memory has limited write cycles).

Windows Vista and above will use the 2048 sector alignment as will Ubuntu, so it isn’t necessary to worry about this issue any more, unless you are installing Windows XP. MAC OS X is the big loser in all of this as it doesn’t care about alignment beyond 4k which may or may not work well depending on the specific block size of your HD/SSD.

Continue reading Partition alignment largely a moot point now