默認狀況下VDI 最大隻能建立2T空間linux
先經過ide
[root@xen-2]# xe sr-listui
uuid ( RO) : 212563a0-ef8b-4eb8-4ca9-**
name-label ( RW): raid0-sas
name-description ( RW):
host ( RO): xen-2
type ( RO): lvm
content-type ( RO): usercode
[root@xen-2]# xe vdi-create type=user virtual-size=8000GiB sr-uuid=212563a0-ef8b-4eb8-4ca9-** name-label=win2008_data sm-config:type=rawblog
Error code: SR_BACKEND_FAILURE_79
Error parameters: , VDI Invalid size [opterr=VDI size must be between 1 MB and 2093050 MB],ip
解決方法:it
先建立一個空間小於2T的io
[root@xen-2]# xe vdi-create type=user virtual-size=2000GiB sr-uuid=212563a0-ef8b-4eb8-4ca9-** name-label=data sm-config:type=raw
3eebdc12-ae3f-44c8-a44f-**class
[root@xen-2]# vgsfile
VG_XenStorage-212563a0-ef8b-4eb8-4ca9-** 1 2 0 wz--n- 43.66t 43.36t
經過lvs找到對應的LV關係 lvdisplay vgdisplay
--- 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-37f60eb6-1aa6-1151-7c3f-14e083ae8cd1/LV-8b279d01-cc70-40c8-ac7f-3321d2fe932c --config global{metadata_read_only=0}
[root@xen-2]xe vdi-list params=all
點擊Rescan 磁盤空間就看見了,而後在相應的主機中關聯磁盤就行了。
linux grep 顯示先後幾行
grep -C 5 foo file 先後grep -B 5 foo file beforegrep -A 5 foo file after