kvm 创建 基于glusterfs的存储池

# virsh pool-create-as --name primary_gluster --type netfs --source-host $(hostname) --source-path /primary --source-format glusterfs --target /mnt/libvirt/primary_gluster

The components that the above command uses, are: 
  • primary_gluster : the name of the storage pool in libvirt
  • netfs : the type of the pool, netfs mounts the 'pool' under the given --target
  • $(hostname) : one of the Gluster servers that is part of the Trusted Storage Pool that provides the Gluster volume
  • /primary : the name of the Gluster volume
  • /mnt/libvirt/primary_gluster : directory where libvirt will mount the Gluster volume
[root@sn192-168-174-65 mnt]# repoquery -ql glusterfs-fuse
/sbin/mount.glusterfs#包含了用户空间挂载命令.
/usr/bin/fusermount-glusterfs
/usr/lib64/glusterfs/3.6.0.54/xlator/mount/fuse.so
[root@sn192-168-174-65 mnt]# yum install glusterfs-fuse -y
===================================================================================================================================
 Package                            Arch                       Version                              Repository                Size
===================================================================================================================================
Installing:
 glusterfs-fuse                     x86_64                     3.6.0.54-1.el6                       base                      81 k
Updating for dependencies:
 glusterfs                          x86_64                     3.6.0.54-1.el6                       base                     1.3 M
 glusterfs-api                      x86_64                     3.6.0.54-1.el6                       base                      62 k
 glusterfs-libs                     x86_64                     3.6.0.54-1.el6                       base                     272 k

Transaction Summary
===================================================================================================================================
Install       1 Package(s)
Upgrade       3 Package(s)


virsh # pool-define-as --name gv_KVM --type netfs --source-host 192.168.174.80 --source-path /gv_KVM --source-format glusterfs --target /mnt/gv
Pool gv_KVM defined
virsh # pool-start gv_KVM
Pool gv_KVM started

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值