xenserver 新增本地硬盘存储

Type "xsconsole" for access to the management console

1、进入命令行模式

2、查看硬盘与分区情况

[root@xcw56 ~]# fdisk -l
Disk /dev/cciss/c0d0: 73.3 GB, 73372631040 bytes
255 heads, 32 sectors/track, 17562 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1        1029     4194304   83  Linux
/dev/cciss/c0d0p2            1029        2057     4194304   83  Linux
/dev/cciss/c0d0p3            2057       17562    63264320+  8e  Linux LVM
Disk /dev/cciss/c0d1: 73.3 GB, 73372631040 bytes
255 heads, 32 sectors/track, 17562 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes
Disk /dev/cciss/c0d1 doesn't contain a valid partition table

3、创建磁盘
[root@xcw56 ~]# pvcreate /dev/cciss/c0d1
Physical volume "/dev/cciss/c0d1" successfully created

4、查看Xen_Xenstorage全名 
[root@xcw56 ~]# vgscan
Reading all physical volumes.  This may take a while...
Found volume group "VG_XenStorage-b491c028-1e88-220f-e6a4-b9a5828610d4" using metadata type lvm2
  
5、挂接磁盘
[root@xcw56 ~]# vgextend VG_XenStorage-b491c028-1e88-220f-e6a4-b9a5828610d4 /dev/cciss/c0d1
Volume group "VG_XenStorage-b491c028-1e88-220f-e6a4-b9a5828610d4" successfully extended

6、重启Xenserver,完成后就可以在本地磁盘中看见了
    另:在 XenServer 要新增硬碟要用手動命令列的方式來進行,這裡的硬碟表示為本地端的硬碟,如系統上的 SATA 或是 SAS 的硬碟,而且還要重新開機從能完成. XenServer 採用的是 LVM 的方式來管裡硬碟空間,所以它可以很簡單的方式把硬碟空間放大縮小,LVM(Logical Volume Manager)是一種可以動態變更 partition 大小的方式,可以讓你能更容易利用管理你的硬碟.有興趣的可以參考 LVM-簡介 - http://benjr.tw/?q=node/55

猜你喜欢

转载自wecoo.iteye.com/blog/1117131