setup hypervisorganesha - csabahenk/manila GitHub Wiki
The following are instructions to setup NFS-Ganesha on a Nova-hypervisor to enable "hypervisor mediated storage access" feature in Manila with GlusterFS as the backend.
##Instructions Common dependencies (GlusterFS and NFS-Ganesha): bison, flex
NFS-Ganesha Dependencies: rpm-build, xfsprogs, cmake, and libcap-devel
OS running in the VM: Fedora 19
Setup OpenStack services using DevStack's single node installation.
####Cloning and working with the right NFS-Ganesha source
$ cd ~
$ git clone --recursive https://github.com/nfs-ganesha/nfs-ganesha.git
$ cd nfs-ganesha
$ git checkout -b next origin/next
Check whether you get the ntirpc source, a submodule in nfs-ganesha code base.
####Building and compiling Creating a seperating build directory to keep the code source directory clean.
$ mkdir ~/build
$ cd ~/build
$ cmake -DUSE_FSAL_GLUSTER=ON -DCURSES_LIBRARY=/usr/lib64 \
>-DCURSES_INCLUDE_PATH=/usr/include/ncurses \
>-DCMAKE_BUILD_TYPE:STRING=Debug ~/nfs-ganesha/src/
$ make -j24 VERBOSE=1
$ sudo make install
####Setting ganesha configuration file
$ cd ~
$ cp ~/nfs-ganesha/src/FSAL/FSAL_GLUSTER/README ganesha.conf
Edit the file as follows. Remove or comment out the initial instructions in the conf file. Make changes to the variables in the Export section to export a Gluster volume or a sub directory in a Gluster volume.
If you want to export a gluster volume, testvol, to any ip, then you need to do the following
Set Path, FS_Specific, and Pseudo variables in the Export section of the file.
EXPORT
{
Export_Id = 77;
Path = "/testvol";
FS_Specific = "volume=testvol,hostname=10.70.43.47";
Root_Access = "*";
RW_Access = "*";
Pseudo = "/testvol";
Anonymous_root_uid = -2;
NFS_Protocols = "3,4";
Transport_Protocols = "TCP";
SecType = "sys";
MaxRead = 131072;
MaxWrite = 131072;
PrefRead = 32768;
PrefWrite = 32768;
PrefReaddir = 0;
Filesystem_id = 192.168;
Tag = "gfs";
}
####Running NFS-Ganesha Prerequisites
Disable NFS process running on the machine. If Gluster-NFS process is running you could do the following to kill it.
# gluster vol list | xargs -I {} gluster vol set {} nfs.disable ON
Or if it's NFS kernel then,
# systemctl stop nfs-server
Make sure that the library libgfapi.so.0 is in the appropriate directory. If GlusterFS is source installed, then the libgfapi libraries would by default be in /usr/local/lib, and the libfsalgluster.so wouldn't be able to access it. So you'd have to create a symlink as follows,
$ sudo ln -s /usr/local/lib/libgfapi.so.0.0.0 /usr/lib64/libgfapi.so.0
Now you can run NFS-Ganesha
$ sudo /usr/local/bin/ganesha.nfsd -f ~/ganesha.conf -L \
>./nfs-ganesha.log -N NIV_FULL_DEBUG -d
####Reference: