GlusterFS cann't active in oVirt because gluster's brick directory & subd's permission problem not vdsm.kvm 755

今天在ovirt中使用glusterfs时, 发现一点问题, gfs deactive后就无法激活了, 查看日志.

/var/log/ovirt-engine/engine.log
2014-08-08 08:26:09,087 ERROR [org.ovirt.engine.core.bll.storage.GLUSTERFSStorageHelper] (org.ovirt.thread.pool-6-thread-50) [d59bd20] The connection with details 172.16.3.150:/gfs1 failed because of error code 469 and error message is: permission settings on the specified path do not allow access to the storage.
verify permission settings on the specified storage path.
2014-08-08 08:26:09,091 ERROR [org.ovirt.engine.core.bll.storage.ConnectStorageToVdsCommand] (org.ovirt.thread.pool-6-thread-50) [d59bd20] Transaction rolled-back for command: org.ovirt.engine.core.bll.storage.ConnectStorageToVdsCommand.
2014-08-08 08:26:09,092 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.ActivateStorageDomainVDSCommand] (org.ovirt.thread.pool-6-thread-46) [2edf4d01] START, ActivateStorageDomainVDSCommand( storagePoolId = 00000002-0002-0002-0002-0000000000ec, ignoreFailoverLimit = false, storageDomainId = 8f6f0ec3-2183-48cd-9ec4-aface2540629), log id: 3a874700
2014-08-08 08:26:09,179 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.ActivateStorageDomainVDSCommand] (org.ovirt.thread.pool-6-thread-46) [2edf4d01] Failed in ActivateStorageDomainVDS method
2014-08-08 08:26:09,180 ERROR [org.ovirt.engine.core.vdsbroker.irsbroker.IrsBrokerCommand] (org.ovirt.thread.pool-6-thread-46) [2edf4d01] IrsBroker::Failed::ActivateStorageDomainVDS due to: IRSErrorException: IRSGenericException: IRSErrorException: Failed to ActivateStorageDomainVDS, error = Storage domain does not exist: ('8f6f0ec3-2183-48cd-9ec4-aface2540629',), code = 358

问题出在权限上面.

查看brick的目录权限, 两个brick节点的权限都变成了root:root. 600.

drw-------  4 root root       4096 Aug  6 17:03 gfs_b1

而oVirt要求的目录是vdsm:kvm的, 不管是NFS还是GlusterFS. 都需要这样的owner和group.

查看 http://wiki.ovirt.org/Features/GlusterFS_Storage_Domain

指出, 使用GlusterFS, 必须修改volume的权限.

Important Pre-requisites

If the GlusterFS volume is created using oVirt's GlusterFS GUI, then don't forget to click on "Optimize for virt. store" which helps set the right permissions and enables the optimum GlusterFS translators for virtualization usecase
If the GlusterFS volume was created manually, then ensure the below options are set on the volume, so that its accessible from oVirt
volume set <volname> storage.owner-uid=36
volume set <volname> storage.owner-gid=36
The below settings/options of GlusterFS volume must also be enabled for it to be able to work as a oVirt storage domain. Currently its not possible to set these from oVirt GlusterFS GUI
option rpc-auth-allow-insecure on ==> in glusterd.vol (ensure u restart glusterd service... for this to take effect)
volume set <volname> server.allow-insecure on ==> (ensure u stop and start the volume.. for this to take effect)
Other packages that are needed on the hypervisor host (aka VDSM host) are...
Needs minm libvirt version 1.0.1 (which has the gluster protocol/network disk support)
Needs qemu version 1.3 (which has the gluster block backend support)
Needs vdsm-gluster plugin, which pulls in all the related requirements (glusterfs, etc)

修改gid, uid和server.allow-insecure.

[root@40 data01]# id vdsm
uid=36(vdsm) gid=36(kvm) groups=36(kvm),179(sanlock),107(qemu)

[root@150 data01]# gluster
gluster> volume set gfs1 server.allow-insecure on
gluster> volume set gfs1 storage.owner-uid 36
volume set: success
gluster> volume set gfs1 storage.owner-gid 36
volume set: success

gluster> volume info
 未修改的卷:
Volume Name: sv1
Type: Stripe
Volume ID: eb236299-8344-4dde-bc51-36ad34594511
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 172.16.3.150:/data01/gfs2
Brick2: 172.16.3.40:/data01/gfs2
 修改过的卷:
Volume Name: gfs1
Type: Replicate
Volume ID: 1318eb16-6984-4ee3-baa0-c13cd26424ae
Status: Started
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 172.16.3.150:/data01/gfs_b1
Brick2: 172.16.3.40:/data01/gfs_b1
Options Reconfigured:
server.allow-insecure: on
storage.owner-gid: 36
storage.owner-uid: 36

gluster> volume status gfs1 detail
Status of volume: gfs1
------------------------------------------------------------------------------
Brick                : Brick 172.16.3.150:/data01/gfs_b1
Port                 : 49152
Online               : Y
Pid                  : 2116
File System          : ext4
Device               : /dev/sdb1
Mount Options        : rw,noatime,nodiratime,nobarrier
Inode Size           : 256
Disk Space Free      : 173.9GB
Total Disk Space     : 182.8GB
Inode Count          : 12173312
Free Inodes          : 12173067
------------------------------------------------------------------------------
Brick                : Brick 172.16.3.40:/data01/gfs_b1
Port                 : 49152
Online               : Y
Pid                  : 6246
File System          : ext4
Device               : /dev/mapper/360026b902fd4120014d4569d05d0d581
Mount Options        : rw,noatime,nodiratime,nobarrier
Inode Size           : 256
Disk Space Free      : 131.8GB
Total Disk Space     : 134.0GB
Inode Count          : 8921088
Free Inodes          : 8920953

修改所有 brick 目录的mod

on 40 exec # chmod -R 755 /data01/gfs_b1
on 150 exec # chmod -R 755 /data01/gfs_b1

现在可以正常的激活GlusterFS domain了.

[参考]

1. http://blog.gluster.org/category/glusterfs-openstack-cinder/

2. http://wiki.ovirt.org/Features/GlusterFS_Storage_Domain

3. http://www.middleswarth.net/2012/07/04/installing-ovirt-3-1-and-glusterfs-using-either-nfs-or-posix-native-file-system/

时间: 2024-11-10 00:24:38

GlusterFS cann't active in oVirt because gluster's brick directory & subd's permission problem not vdsm.kvm 755的相关文章

oVirt 3.4.3-1 bug: when enable gluster and vdsm-gluster not installed in HOSTs , cann&#039;t active host after restart ovirt-engine

oVirt 3.4.3-1 bug: when enable gluster and vdsm-gluster not installed in HOSTs , cann't active host after restart ovirt-engine 前面一篇我在oVirt中的Cluster中开启了Gluster的选项, 但是在Volume中无法添加volume. 配置后重启ovirt-engine后, 主机就显示不可用了. 手工去激活主机也会报错, 如下 :  /var/log/ovirt-

Gluster / GlusterFS 3.3 Beta2发布 集群文件系统

GlusterFS是一个集群文件系统,能够缩放文件到几个PB的数据量.它通过Infiniband RDMA和http://www.aliyun.com/zixun/aggregation/29912.html">TCP/IP技术将多个存储砖聚集成一个大的并行网络文件系统.GlusterFS是基于一个可堆叠的用户空间设计,而不影响性能. Gluster / GlusterFS 3.3 Beta2版本添加统一的文件和对象存储,它使用户从POSIX样式能够访问相同的数据存储,以及一个S3或SWI

oVirt usage attention

汇总一下oVirt的使用注意事项. 1. 数据库相关 http://blog.163.com/digoal@126/blog/static/1638770402014628114756319/ http://blog.163.com/digoal@126/blog/static/163877040201462942137640/ 1.1 建议配置ovirt engine时, 数据库用户提前改成超级用户 1.2 建议数据库的owner是连接用户 1.3 不建议自建schema, 建议使用publi

oVirt guest | VM &amp; HOST HA in one Cluster

oVirt支持虚拟机的HA配置, 当集群中有合适的机器可以接管failed的宿主机上的虚拟机时, 这些虚拟机会自动在同集群下的合适的主机上运行. 但是有几个前提条件 :  1. Power management must be configured for the hosts running the highly available virtual machines. 需要配置HA的虚拟机, 它的宿主机的电源管理必须配置. 2. The host running the highly avail

在CentOS 6.4上安装配置GlusterFS的方法

环境介绍: OS: CentOS 6.4 x86_64 Minimal Servers: sc2-log1,sc2-log2,sc2-log3,sc2-log4 Client: sc2-ads15 具体步骤: 1. 在sc2-log{1-4}上安装GlusterFS软件包:  代码如下 复制代码 # wget -P /etc/yum.repos.d http://download.gluster.org/pub/gluster/glusterfs/LATEST/CentOS/glusterfs-

oVirt add os iso storage domain and use ovirt-iso-uploader upload iso

在oVirt中添加一个安装光盘的ISO镜像. 以NFS为例 : [root@39 data01]# mkdir /data01/os_iso [root@39 data01]# chown vdsm:kvm /data01/os_iso [root@39 data01]# vi /etc/exports /data01/os_iso 172.16.3.0/24(rw,no_root_squash,sync) [root@39 data01]# service nfs reload [root@3

介绍oVirt是如何组织与分配各种存储器的使用

oVirt(open Virtualization) 是一个基于 KVM(Kernel-based Virtual http://www.aliyun.com/zixun/aggregation/39569.html">Machine) 的开源 IaaS(Infrastructure as a Service) 项目,其前身是 Redhat 的桌面虚拟化商业产品.存储器的管理是 oVirt 的重点,本文将介绍 oVirt 是如何组织与分配各种存储器的,用户应该如何使用它. oVirt 的

linux中安装RHEV-M的教程详解

一.yum源配置 安装rhev-m需要配置RHEV-M.RHEV-H.Supplementary.JBoss四个源,这个实验的时候,我将其整合到了一个配置中.并将其保存到/etc/yum.repos.d/目录下.如下: [root@rhevm ~]# wget http://classroom.example.com/materials/rhevm.repo  -P /etc/yum.repos.d/ # cat /etc/yum.repos.d/rhevm.repo [RHEVMgr] nam

PHP中cURL错误号对照[转]

PHP cURL curl_errno 在php程序编写中,使用curl函数库的几率还是挺高的,如curl_init().curl_setopt().curl_exec().curl_errno()等都是常用的函数,尤其是在获取网页相关信息的时候.在使用这些函数的时候,有时会遇到一些问题,如之前遇到的IIS运行PHP出现Call to undefined function curl_init()的问题,这些问题一般都比较基础,遇到问题并解决问题,是一个程序员成长的历程,在解决问题的过程中能学会更