计算节点和控制节点上都安装一下
cd /etc/yum.repos.d/
wget http://download.gluster.org/pub/gluster/glusterfs/3.4/3.4.3/CentOS/glusterfs-epel.repo
yum install glusterfs-server
验证一下两个节点是否安装成功
[root@linux-node1 ~]# glusterfs -V
glusterfs 3.4.5 built on Jul 24 2014 19:11:45
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2013 Red Hat, Inc.
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3
or later), or the GNU General Public License, version 2 (GPLv2),
in all cases as published by the Free Software Foundation.
[root@linux-node2 yum.repos.d]# glusterfs -V
glusterfs 3.4.5 built on Jul 24 2014 19:11:45
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2013 Red Hat, Inc.
GlusterFS comes with ABSOLUTELY NO WARRANTY.
It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3
or later), or the GNU General Public License, version 2 (GPLv2),
in all cases as published by the Free Software Foundation.
启动
我们要先把NFS卸载掉
umount 192.168.33.11:/data/nfs
查看一下
mount
重启一下cinder的相关服务
[root@linux-node1 ~]# for i in {api,scheduler,volume};do /etc/init.d/openstack-cinder-$i restart;done
停止 openstack-cinder-api: [确定]
正在启动 openstack-cinder-api: [确定]
停止 openstack-cinder-scheduler: [确定]
正在启动 openstack-cinder-scheduler: [确定]
停止 openstack-cinder-volume: [确定]
正在启动 openstack-cinder-volume: [确定]
[root@linux-node1 ~]# mount
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
192.168.33.11:/demo on /var/lib/cinder/mnt/4ac2acc000ff60653979b4a905bdecb3 type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)
创建云硬盘
我们查看一下云硬盘都存在哪
[root@linux-node1 ~]# cat /etc/cinder/glusterfs_shares
192.168.33.11:/demo
[root@linux-node1 ~]# mount
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
192.168.33.11:/demo on /var/lib/cinder/mnt/4ac2acc000ff60653979b4a905bdecb3 type fuse.glusterfs (rw,default_permissions,allow_other,max_read=131072)
[root@linux-node1 ~]# ll /var/lib/cinder/mnt/4ac2acc000ff60653979b4a905bdecb3
总用量 4
-rw-rw-rw- 1 root root 1073741824 8月 27 15:58 volume-ca55ee76-956c-4fb6-96ce-d0a5d1f45aa9
[root@linux-node1 ~]# ll /data/gg1/
总用量 4
-rw-rw-rw- 2 root root 1073741824 8月 27 15:58 volume-ca55ee76-956c-4fb6-96ce-d0a5d1f45aa9