**默認情況下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 磁盤空間就看見了,然後在相應的主機中關聯磁盤就好了。**