18
5.1.2. Converting an Existing Host to Use Thin Provisioning
To destroy an existing LVM based local SR, and replace it with a thin provisioned EXT3 based SR, enter the following
commands.
Warning:
These commands will destroy your existing local SR, and VMs on the SR will be permanently
deleted.
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>