Source compiler installation ganesha
Brief introduction
- System Environment: CentOS 7.5
- ceph:luminous
- nfs-ganesha:v2.6 stable
installation steps
Installation depends
- First you need to install the compiler will use the public library
1
|
yum install gcc git cmake autoconf libtool bison flex doxygen openssl-devel gcc-c++ krb5-libs krb5-devel libuuid-devel nfs-utils -y |
If you are using Ubuntu system, mainly in the following several different packages
gcc-c++
-> g++
libuuid-devel
-> uuid-dev
nfs-utils
-> nfs-kernel-server
- To generate
FSAL_RGW
the module needs to be installed librgw2-devel
1
|
yum install librgw2-devel -y |
- To generate
FSAL_CEPH
the module needs to be installed libcephfs1-devel
1
|
yum install libcephfs-devel -y |
Source download
Cloning to a local source
1
|
git clone -b V2.6-stable https://github.com/nfs-ganesha/nfs-ganesha.git --recursive |
Compile
-
cmake
nfs-ganesha
Source
- If you need to generate
FSAL_RGW
the module, then the compiler option to add: -DUSE_FSAL_RGW=ON
- If you need to generate
FSAL_CEPH
the module, then the compiler option to add: -DUSE_FSAL_CEPH=ON
1
2
3
4
5 |
cd nfs-ganesha
cd src/
mkdir build
cd build/
cmake -DUSE_FSAL_RGW=ON -DUSE_FSAL_CEPH=ON ../ |
cmake
The process will be the following output
1
2
3
4
5 6 7 8 9 10 11 12 13 |
-- Looking for ceph_ll_lookup_root in cephfs - found
-- Found cephfs libraries: /usr/lib64/libcephfs.so
-- Found CEPHFS: /usr/include
-- Looking for rgw_mount in rgw
-- Looking for rgw_mount in rgw - found
-- Found rgw libraries: /usr/lib64/librgw.so
-- Found RGW: /usr (found suitable version "1.1", minimum required is "1.1") ... -- USE_FSAL_CEPH = ON -- USE_FSAL_CEPH_MKNOD = OFF -- USE_FSAL_CEPH_SETLK = OFF -- USE_FSAL_CEPH_LL_LOOKUP_ROOT = ON -- USE_FSAL_RGW = ON |
Make sure -- USE_FSAL_CEPH
as ON
well -- USE_FSAL_RGW
as ON
- In
build
compiling and installation directory
PS: the make install
generated output, you can see:
– Up-to-date: /usr/share/doc/ganesha/config_samples/rgw.conf … – Up-to-date: /usr/share/doc/ganesha/config_samples/ceph.conf
These two files is the configuration RGW
and CephFS
configure ganesha-nfs
the configuration template
Configuration service
The nfs-ganesha
next source directory nfs-ganesha/src/scripts/systemd
under the directory service
to copy files to the system /usr/lib/systemd/system/
directory, to nfs-ganesha
configure the system so that the service systemd
takes over, and then set the boot from Kai
1
2
3
4
5 |
cd nfs-ganesha/src/scripts/systemd
cp nfs-ganesha-config.service /usr/lib/systemd/system/nfs-ganesha-config.service
cp nfs-ganesha.service.el7 /usr/lib/systemd/system/nfs-ganesha.service
cp nfs-ganesha-lock.service.el7 /usr/lib/systemd/system/nfs-ganesha-lock.service
systemctl enable nfs-ganesha |
The DBUS Interface
Configure the system DBUS service (compiled and installed manually perform this process)
- The file
src/scripts/ganeshactl/org.ganesha.nfsd.conf
is copied to the directory /etc/dbus-1/system.d/
. DBus need to restart the service (messagebus) to load this file
1
2
|
cp src/scripts/ganeshactl/org.ganesha.nfsd.conf /etc/dbus-1/system.d/
systemctl restart messagebus |
- Restart the
nfs-ganesha
service, because the connection to the server DBus performed only when the service is initialized, so if you forget before copying org.ganesha.nfsd.conf
the file you need to restart the nfs-ganesha
service
1
|
systemctl restart nfs-ganesha |
- To see
nfs-ganesha
whether the log observe normal service up and running, usually/var/log/ganesha/ganesha.log
1
|
tail -f /var/log/ganesha/ganesha.log |
Edit Profile
In fact, this step can be skipped, just to back Check Export can detect only a mount point, if this step is not configured, manila
for each share add a separate configuration file will be connected to the host via SSH
Edit the /etc/ganesha/ganesha.conf
file, writes the following
1
2
3
4
5 6 7 8 9 10 11 12 |
EXPORT
{
Export_ID=1; Path = "/"; Pseudo = /; Access_Type = RW; NFS_Protocols = 4; Transport_Protocols = TCP; FSAL { Name = CEPH; } } |
Start nfs-ganesha
Services
- There compile and install a pit, is less a
nfs-ganesha-ceph
package, resulting in manila
the passed command not working properly, you need to use a separate yum
command to install (because I did not find the source address, would not be able to install their own translation, so the compiler installation nfs-ganesha
might as well directly Add source installed ????? embodiment)
1
|
yum install nfs-ganesha-ceph |
- Execute the following command to restart
nfs-ganesha
1
|
systemctl restart nfs-ganesha |
- Use the following command to view the
nfs-ganesha
service is operating normally
1
|
systemctl status nfs-ganesha |
Check Export
Using the following command detection mount points
1
2
3
4
|
[root@c1 ~]# showmount -e
Export list for c1:
/ (everyone) [root@c1 ~]# |
Reference links