我们都知道xenserver安装后,不管你的盘有多大,只有4G的空间。
故操作是:新建LV卷,可自定义大小
1、vgdisplay #先查看剩余空间
[root@XenServer /]# vgdisplay--- Volume group ---VG Name VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2System IDFormat lvm2Metadata Areas 1Metadata Sequence No 8VG access read/writeVG Status resizableMAX LV 0Cur LV 1Open LV 0Max PV 0Cur PV 1Act PV 1VG Size 11.99 GBPE Size 4.00 MBTotal PE 3069Alloc PE / Size 1 / 4.00 MBFree PE / Size 3068 / 11.98 GBVG UUID gdk23O-Ugch-ygeb-wiZc-aoIr-QbTL-XoQQfx
2、lvdisplay VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2 #查看该区
[root@XenServer /]# lvdisplay VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2--- Logical volume ---LV Name /dev/VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2/MGTVG Name VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2LV UUID qnsQew-gAqU-IEqr-rGsF-jO3j-crwE-eNHqx5LV Write Access read/writeLV Status NOT availableLV Size 4.00 MBCurrent LE 1Segments 1Allocation inheritRead ahead sectors auto
3、lvcreate -L 20GB -n iso VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2 #新建20G的lv卷iso
[root@XenServer /]# lvcreate -L 20GB -n iso VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2Logical volume "lviso" created
顺带提一下如何添加空间:
[root@XenServer /]# lvcreate -n lviso -L +6G VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2Logical volume "lviso" created
4、lvdisplay VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2 #再次查看该区
[root@XenServer /]# lvdisplay VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2--- Logical volume ---LV Name /dev/VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2/MGTVG Name VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2LV UUID qnsQew-gAqU-IEqr-rGsF-jO3j-crwE-eNHqx5LV Write Access read/writeLV Status NOT availableLV Size 4.00 MBCurrent LE 1Segments 1Allocation inheritRead ahead sectors auto--- Logical volume ---LV Name /dev/VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2/isoVG Name VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2LV UUID lmJmYH-OiRW-gQle-nCJk-Y9M9-zVev-JGvrqKLV Write Access read/writeLV Status available# open 0LV Size 20.00 GBCurrent LE 1536Segments 1Allocation inheritRead ahead sectors auto- currently set to 1024Block device 252:1
5、mkfs.ext3 /dev/VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2/iso #格式化为ext3格式
[root@XenServer /]# mkfs.ext3 /dev/VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2/iso[root@XenServer /]#
6、mkdir /iso #在根目录下建立iso文件夹,用于ISO镜像文件的挂载
[root@XenServer /]# mkdir /iso[root@XenServer /]#
7、vgchange -a y #激活所有卷组
8、mount /dev/VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2/lviso /iso #挂载/ISO文件夹下的iso镜像文件
[root@XenServer /]# mount /dev/VG_XenStorage-205eecff-2466-84fe-56d5-81472e44f3c2/lviso /iso[root@XenServer /]#
9、df -h #查看容量
[root@XenServer /]# df -hFilesystem Size Used Avail Use% Mounted on/dev/sda1 4.0G 1.7G 2.1G 46% /none 380M 0 380M 0% /dev/shm/opt/xensource/packages/iso/XenCenter.iso44M 44M 0 100% /var/xen/xc-install/dev/mapper/XSLocalEXT--5983fa21--42bd--0cd6--aafd--78534a7908f7-5983fa21--42bd--0cd6--aafd--78534a7908f79.9G 911M 8.5G 10% /var/run/sr-mount/5983fa21-42bd-0cd6-aafd-78534a7908f7/dev/mapper/VG_XenStorage--205eecff--2466--84fe--56d5--81472e44f3c2-lviso6.0G 141M 5.5G 3% /ISO
10、通过Xftp 软件将 下载好的iso镜像文件上传到 /iso 目录中 注意更改 文件权限755
在这就可以转到XenCenter客户端操作了
新闻热点
疑难解答