XenServer \ XCP-ng: How to Create a Virtual Disk Larger than 2tb
So recently I ran into an issue where I needed to create a virtual disk 20TB in size. Unfortunately, XCP-ng does not allow doing this through its manager because it uses an older disk system. However, you can manually create an LVM partition and map it to the VM. Here is what you need to do:
Grab your SR UUID from the management console. The UUID I will be using for example commands is f8f32ef5-81d7-9154-d0f2-b92559b8ecbc. You will need to replace it with your UUID.
Now we need to get the volume group device name:
vgs | awk '{print $1}' | grep f8f32ef5-81d7-9154-d0f2-b92559b8ecbc
Now we create the volume. Make to change the “20T” to your desired size in TB:
lvcreate -L20T -n"LV-"$(uuidgen) VG_XenStorage-f8f32ef5-81d7-9154-d0f2-b92559b8ecbc --config global{metadata_read_only=0}
Finally, scan the SR and you should see a no name virtual disk.
xe sr-scan uuid=f8f32ef5-81d7-9154-d0f2-b92559b8ecbc
Now you can attach the created disk to your VM. Just make sure to change the name in the management center.
There might be a way to thin provision it, but I don’t know how to do that. If you have found a way to do so, please comment down below.
Which UUID do you mean? I always get errors…
What step are you on? What id the UUID of your Storage Repository?
How do you do this on a NFS Volume Group? The “vgs” command only shows my local storage volumes not NFS mounted ones.
We’ve not had to use NFS with XenServer or XCP-ng, so unfortunately cannot help you. You might be able to make some progress mixing info from this article with info from this one:
https://discussions.citrix.com/topic/383323-mount-storage-volume-xenserver/
Could you provide more info about what you did. You created a new logical volume in LVM on host/dom0.
How does this help to override a 2TB virtual disk limit? How did you attach this 20TB disk to a VM? Thanks
Id imagine it will not work because it was essentially making a lvm volume. Id really only recommend this for a single host deployment, and honestly would not even really recommend it, I needed it for a one off
It’s been a few years, but does this work in a pool with iSCSI storage? For instance, if you do this on host A, can the VM be live-migrated to host B or C, assuming the SR is accessible to all the hosts?
I would not recommend this for any kind of clustered configuration