**默认情况下VDI 最大只能创建2T空间

先通过

[root@xen-2]# xe sr-list

uuid ( RO) : 212563a0-ef8b-4eb8-4ca9-
name-label ( RW): raid0-sas
name-description ( RW):
host ( RO): xen-2
type ( RO): lvm
content-type ( RO): user

[root@xen-2]# xe vdi-create type=user virtual-size=8000GiB sr-uuid=212563a0-ef8b-4eb8-4ca9- name-label=win2008_data sm-config:type=raw

Error code: SR_BACKEND_FAILURE_79
Error parameters: , VDI Invalid size [opterr=VDI size must be between 1 MB and 2093050 MB],

解决方法:

先创建一个空间小于2T的

[root@xen-2]# xe vdi-create type=user virtual-size=2000GiB sr-uuid=212563a0-ef8b-4eb8-4ca9- name-label=data sm-config:type=raw

[root@xen-2]# vgs

VG_XenStorage-212563a0-ef8b-4eb8-4ca9- 1 2 0 wz--n- 43.66t 43.36t

通过lvs找到对应的LV关系

[root@xen-2]# lvdisplay

--- Logical volume ---
LV Path /dev/VG_XenStorage-212563a0-ef8b-4eb8-4ca9-/LV-3eebdc12-ae3f-44c8-a44f-
LV Name LV-3eebdc12-ae3f-44c8-a44f-

VG Name VG_XenStorage-212563a0-ef8b-4eb8-4ca9-*****
LV UUID 6iNpla-T7kL-OdaA-CO4m-qVqa-PUmb-7KVbB7
LV Write Access read/write
LV Creation host, time klicen-xen-2, 2017-04-27 15:15:59 +0800
LV Status NOT available
LV Size 1.95 TiB
Current LE 512000
Segments 1
Allocation inherit
Read ahead sectors auto

[root@xen-2]# lvextend -L +6000G /dev/VG_XenStorage-212563a0-ef8b-4eb8-4ca9- --config global{metadata_read_only=0}
#网上多为lvextend -L +6000G LV-3eebdc12-ae3f-44c8-a44f-
(LV NAME) --config global{metadata_read_only=0} ,实际测试中使用的则为 LV Path

[root@xen-2]xe vdi-list params=all

点击Rescan 磁盘空间就看见了,然后在相应的主机中关联磁盘就好了。**