Wednesday 17 August 2011

Enabling thin provisioning on an existing XenServer


Enabling Thin Provisioning is an option during XenServer Installation. Thin Provisioned disks are a pre-requisite for using the new XenServer feature IntelliCache.

If you missed this option when creating the machine storage repository it is possible to enable the feature from the CLI afterwards. This will however destroy your Storage repository as the file format for Thin Provisioning is EXT3 as opposed to the standard LVM.

In some instances this method may still however be useful.

I got the command from the XenServer install guide CTX129387

localsr=`xe sr-list type=lvm host=<hostname> params=uuid --minimal`
echo localsr=$localsr
pbd=`xe pbd-list sr-uuid=$localsr params=uuid --minimal`
echo pbd=$pbd
xe pbd-unplug uuid=$pbd
xe pbd-destroy uuid=$pbd
xe sr-forget uuid=$localsr
sed -i "s/'lvm'/'ext'/" /etc/firstboot.d/data/default-storage.conf
rm -f /etc/firstboot.d/state/10-prepare-storage
rm -f /etc/firstboot.d/state/15-set-default-storage
service firstboot start
xe sr-list type=ext
To enable local caching, enter the following commands:
xe host-disable host=<hostname>
localsr=`xe sr-list type=ext host=<hostname> params=uuid --minimal`
xe host-enable-local-storage-caching host=<hostname> sr-uuid=$localsr
xe host-enable host=<hostname>

No comments:

Post a Comment