I am a fan of thin provisioning, I like the idea of only using the necessary space for something, together with the flexibility of knowing that if I need more space, this will be taken care of automatically.

Enabling thin provisioning on XenServer is very simple at installation time, and not as straightforward if you want to convert an existing SR from thick to thin provisioning. So here are the two scenarios.

Enable thin provisioning at installation time

You simply have to select Enable thin provisioning (Optimized storage for XenDesktop) in the drive selection screen.

Enable thin provisioning on a new hard drive

This is what I found a bit confusing when I was getting started with XenServer, as I did not find any option anywhere to enable the feature. If you have already installed XenServer and you want to enable thin provisioning on a new drive that are adding, you need to use the CLI. The only prerequisite to enable it is that the drive must be formatted in ext3. So, effectively, thin provisioning can only be enabled implicitly by using ext3.

By default, a new SR in XenServer will be formatted in LVM, which does not support thin provisioning. So if you add an SR and you don’t explicitly specify ext3, your disk will default to thick provisioning.

For reference, this is how to do so on the XenServer command line:

xe sr-create host-uuid=$host_uuid content-type=user name-label="SR name" shared=false device-config:device=/dev/sdX type=ext