From 993671e05e3e204a38ac9de9b156062023ce2322 Mon Sep 17 00:00:00 2001 From: Don Domingo Date: Wed, 19 Feb 2014 11:21:28 +1000 Subject: [PATCH] Add a section on GlusterFS storage backend setup This patch adds instructions on how to configure a GlusterFS Storage Backend to the Cloud Admin Guide. Change-Id: If4db479f99b711c4e68f45db0e0fa978c7ac2939 Partial-Bug: #1281444 --- doc/admin-guide-cloud/ch_blockstorage.xml | 1 + .../section_glusterfs_backend.xml | 286 ++++++++++++++++++ 2 files changed, 287 insertions(+) create mode 100644 doc/admin-guide-cloud/section_glusterfs_backend.xml diff --git a/doc/admin-guide-cloud/ch_blockstorage.xml b/doc/admin-guide-cloud/ch_blockstorage.xml index 26d6a47328..a3eae6b743 100644 --- a/doc/admin-guide-cloud/ch_blockstorage.xml +++ b/doc/admin-guide-cloud/ch_blockstorage.xml @@ -117,6 +117,7 @@ + diff --git a/doc/admin-guide-cloud/section_glusterfs_backend.xml b/doc/admin-guide-cloud/section_glusterfs_backend.xml new file mode 100644 index 0000000000..c1d0833cf8 --- /dev/null +++ b/doc/admin-guide-cloud/section_glusterfs_backend.xml @@ -0,0 +1,286 @@ + +
+ Configure a GlusterFS backend + + This section explains how to configure OpenStack Block Storage + to use GlusterFS as a backend. The used GlusterFS shares must + already exist and be accessible from the server hosting the + cinder volume + service. + + + The + cinder volume service + is named openstack-cinder-volume on the + following distributions: + + CentOS + Fedora + openSUSE + Red Hat Enterprise + Linux + SUSE Linux Enterprise + + + In Ubuntu and Debian distributions, the + cinder volume + service is named cinder-volume. + + + Mounting GlusterFS volumes requires utilities and libraries + from the glusterfs-fuse package. This + package must be installed on all systems that will access + volumes backed by GlusterFS. + + + + The utilities and libraries required for mounting GlusterFS + volumes on Ubuntu and Debian distributions are available from + the glusterfs-client package instead. + + + For information on how to install and configure + GlusterFS, refer to the + GlusterDocumentation + page. + + Configuring GlusterFS for the OpenStack Block Storage + + The GlusterFS server must also be configured accordingly in + order to allow OpenStack Block Storage to use GlusterFS shares: + + + + Log in as root to the + GlusterFS server. + + + + + Set each Gluster volume to use the same UID and GID as + the cinder user: + + # gluster volume set VOL_NAME storage.owner-uid cinder-uid +# gluster volume set VOL_NAME storage.owner-gid cinder-gid + Where: + + VOL_NAME is the + Gluster volume name. + cinder-uid is the UID of the cinder user. + cinder-gid is the GID of the cinder user. + + + + The default UID and GID of the + cinder user is + 165 on most distributions. + + + + + + Configure each Gluster volume to accept + libgfapi connections. To do + this, set each Gluster volume to allow insecure ports: + + # gluster volume set VOL_NAME server.allow-insecure on + + + + Enable client connections from unprivileged ports. + To do this, add the following line to + /etc/glusterfs/glusterd.vol: + + option rpc-auth-allow-insecure on + + + + Restart the glusterd service: + + # service glusterd restart + + + + Configuring cinder-volume to use GlusterFS + + Once the GlusterFS service is configured as needed, perform + the following procedure: + + + + Log in as root to the system + hosting the cinder volume service. + + + + + Create a text file named + glusterfs + in /etc/cinder/. + + + Add an entry to + /etc/cinder/glusterfs for each + GlusterFS share that OpenStack Block Storage should use + for backend storage. Each entry should be a separate line, + and should use the following format: + HOST:/VOL_NAME + + Where: + + + + + HOST is the IP address + or host name of the Red Hat Storage server. + + + + + VOL_NAME is the name an + existing and accessible volume on the GlusterFS + server. + + + + + Optionally, if your environment requires additional + mount options for a share, you can add them to the + share's entry: + + HOST:/VOL_NAME -o OPTIONS + + Replace OPTIONS with a + comma-separated list of mount options. + + + + Set /etc/cinder/glusterfs to be + owned by the root user and the + cinder group. + + # chown root:cinder /etc/cinder/glusterfs + + + Set /etc/cinder/glusterfs to be + readable by members of the cinder + group: + + # chmod 0640 FILE + + + Configure OpenStack Block Storage to use the + /etc/cinder/glusterfs file created + earlier. To do so, open the + /etc/cinder/cinder.conf configuration + file and set the + glusterfs_shares_config configuration + key to /etc/cinder/glusterfs. + + On + distributions that include + openstack-config, you can + configure this by running the following command instead: + + # openstack-config --set /etc/cinder/cinder.conf \ +DEFAULT glusterfs_shares_config /etc/cinder/glusterfs + The following + distributions include + openstack-config: + + + CentOS + + + Fedora + + + openSUSE + + + Red Hat Enterprise Linux + + + SUSE Linux Enterprise + + + + + Configure OpenStack Block Storage to use the correct + volume driver, namely + cinder.volume.drivers.glusterfs. To do + so, open the /etc/cinder/cinder.conf + configuration file and set the + volume_driver configuration key to + cinder.volume.drivers.glusterfs. + + On + distributions that include + openstack-config, you can + configure this by running the following command instead: + + # openstack-config --set /etc/cinder/cinder.conf \ +DEFAULT volume_driver cinder.volume.drivers.glusterfs.GlusterfsDriver + + + + You can now restart the service to apply the configuration. + + To restart the + cinder volume service + on CentOS, Fedora, openSUSE, RedHat Enterprise Linux, or SUSE + Linux Enterprise, run: + # service openstack-cinder-volume restart + To restart the + cinder volume service + on Ubuntu or Debian, run: + # service cinder-volume restart + + + OpenStack Block Storage is now configured to use a GlusterFS + backend. + + + In /etc/cinder/cinder.conf, the + glusterfs_sparsed_volumes + configuration key determines whether volumes are + created as sparse files and grown as needed or fully + allocated up front. The default and recommended value + of this key is true, which ensures + volumes are initially created as sparse files. + + + Setting glusterfs_sparsed_volumes + to false will result in volumes + being fully allocated at the time of creation. This + leads to increased delays in volume creation. + + + However, should you choose to set + glusterfs_sparsed_volumes to + false, you can do so directly in + /etc/cinder/cinder.conf. + On + distributions that include + openstack-config, you can + configure this by running the following command instead: + + # openstack-config --set /etc/cinder/cinder.conf \ +DEFAULT glusterfs_sparsed_volumes false + + + If a client host has SELinux enabled, the + virt_use_fusefs Boolean should also be + enabled if the host requires access to GlusterFS volumes on + an instance. To enable this Boolean, run the following command + as the root user: + + # setsebool -P virt_use_fusefs on + This command also makes the Boolean persistent across + reboots. Run this command on all client hosts that require + access to GlusterFS volumes on an instance. This includes all + compute nodes. + +