Hi Patrice,
Thank you very much for your help. I was now able to start the ganesha-proxy
and also mount it on the test vm. Unfortunately, the proxy seems to corrupt the
data.
I will now explain the configuration in detail for a better understanding.
I use in total 3 VMs
1. GANESHA-PROXY 192.168.56.101
2. NFS-CLIENT 192.168.56.102
3. NFS-ORG 192.168.56.103
Now to the settings on the specific VM
NFS-ORG
The first problem I faced after I used your setup was, that I exported
directories that belongs to root, what lead to a conflict with the root_squash
option of the original nfs export. Therefore, I modified the setting
/etc/exports:
/home/swalter/nfs-org *(rw,sync)
ll /home/swalter/nfs-org
drwxr-xr-x 2 swalter swalter 4096 Sep 13 10:33 ./
drwxr-xr-x 21 swalter swalter 4096 Sep 13 10:33 ../
-rw-r--r-- 1 swalter swalter 1034 Sep 13 10:33 foobar.txt
After that, I restarted the nfs service to export the new directory
sudo service nfs-kernel-server restart
GANESHA-PROXY
cat nfs-ganesha-build/test/ganesha.proxy_min.conf
EXPORT
{
# Export Id (mandatory, each EXPORT must have a unique Export_Id)
Export_Id = 77;
# Exported path (mandatory)
#path exported by background nfs server
#Path = /tmp;
#Path = /nfs-org;
Path = /home/swalter/nfs-org;
# Pseudo Path (required for NFS v4)
#path exported by proxy to nfs clients
#Pseudo = /tmp_proxy;
Pseudo = /nfs-ganesha-proxy;
# Required for access (default is None)
# Could use CLIENT blocks instead
Access_Type = RW;
# Exporting FSAL
FSAL {
Name = PROXY;
}
}
PROXY {
Remote_Server {
Srv_Addr = 192.168.56.103;
}
}
After that, I killed the old ganesha server with kill -s SIGTERM <PID> and then
restarted it again with
sudo ganesha.nfsd -f nfs-ganesha-build/test/ganesha.proxy_min.conf -L
./ganesha-proxy.logfile -N NIV_DEBUG -F
There is no directory /nfs-ganesha-proxy at this VM, what seems to me right,
but I am not sure!
NFS-CLIENT
1. TEST
Mount the nfs from the original NFS server
sudo mount -t nfs4 192.168.56.103:/home/swalter/nfs-org ./nfs-dummy/ -v
I was able to mount the directory, read and modify the foobar.txt and also
unmount the nfs volume again. So I think everything works fine.
2. TEST
Mount the nfs from the ganesha-proxy
sudo mount -t nfs4 192.168.56.101:/nfs-ganesha-proxy ./ganesha-dummy/ -v
I was able to mount the directory, read and modify the foobar.txt, but after a
relatively short time, I get the following output:
ls ganesha-dummy/
ls: reading directory 'ganesha-dummy/': Permission denied
On NFS-ORG I get then the following output
ll nfs-org
ls: cannot access 'nfs-org/1G.data': Permission denied
ls: cannot access 'nfs-org/foobar.txt': Permission denied
total 0
d????????? ? ? ? ? ? ./
d????????? ? ? ? ? ? ../
-????????? ? ? ? ? ? 1G.data
-????????? ? ? ? ? ? foobar.txt
For this particular situation, I tried to copy a 1GB File with random data from
the NFS-CLIENT to the NFS volume.
I would assume, that there is some kind of data corruption.
I will try today also a Ganesha->Ganesha-Proxy->NFC-Client setup, to be sure,
that the NFS-Server->Ganesha-PROXY is not the source of the problem.
Best regards,
Stephan
From: LUCAS Patrice [mailto:patrice.lu...@cea.fr]
Sent: 12 September 2017 13:10
To: nfs-ganesha-devel@lists.sourceforge.net
Subject: Re: [Nfs-ganesha-devel] Setup/Configuration problem for a proxy with
nfs-ganesha V2.6-dev.7
Hello Stephan,
The proxy doc on the github page is maybe a bit outdated.
With latest versions of ganesha, no need to have an additionnal binary. You
only need to launch the main ganesha.nfsd binary.
Could you explain your simple test configuration so we could try to provide to
you a correct configuration file ?
Below is an example of a simple updated ganesha conf file to re-export a /tmp
dir from an nfs server :
===============================
EXPORT
{
# Export Id (mandatory, each EXPORT must have a unique Export_Id)
Export_Id = 77;
# Exported path (mandatory)
#path exported by background nfs server
Path = /tmp;
# Pseudo Path (required for NFS v4)
#path exported by proxy to nfs clients
Pseudo = /tmp_proxy;
# Required for access (default is None)
# Could use CLIENT blocks instead
Access_Type = RW;
# Exporting FSAL
FSAL {
Name = PROXY;
}
}
PROXY {
Remote_Server {
Srv_Addr = XXX.XXX.XXX.XXX;
}
}
==============================
Regards,
Patrice LUCAS
On 09/11/17 18:00, Stephan Walter wrote:
Hi,
I run into some problems with the configuration of a ganesha proxy. I have done
until know the following things:
I compiled the actual version from the nfs-ganesha git-hub repository and
successfully configured a basic NFS export through ganesha.
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_CONFIG=everything ~/nfs-ganesha/src/
make && make install
sudo ganesha.nfsd -f nfs-ganesha-build/test/ganesha.min_test.conf -L
./ganesha-min.logfile -N NIV_DEBUG -F
ganesh.min_test.conf:
EXPORT
{
Export_Id = 2;
Path = /tmp/ganesha_test;
Pseudo = /tmp/ganesha_test;
Access_Type = RW;
Squash = None;
FSAL
{
Name = VFS;
}
}
After that I tried to use ganesha to generate a proxy for a nfs-kernel-server
export from another virtual machine, with respect to the documentation at
https://github.com/nfs-ganesha/nfs-ganesha/wiki/PROXY#Configuring_a_NFSGANESHA_server_as_a_NFS_proxy
But I was not able to setup the proxy successful. Since the documentation is
related to the old "configure" based build system, it is not clear to me, if I
still require the proxy.ganesha.nfsd binary or not.
In addition to this, it is still not clear to me, if I have made a mistake with
the ganesha config file etc.
It would be great, if somebody could help me with the correct configuration of
a ganesha proxy. Ffilzwin told me to raise my question at this mailing list, so
I hope this is the right list for this kind of question.
Thank you very much in advance for your help!
Best regards,
Stephan
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net<mailto:Nfs-ganesha-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel
--
Patrice LUCAS
Ingenieur-Chercheur, CEA-DAM/DSSI/SISR/LA2S
tel : +33 (0)1 69 26 47 86
e-mail : patrice.lu...@cea.fr<mailto:patrice.lu...@cea.fr>
Click
here<https://www.mailcontrol.com/sr/YkSBnrXzsoPGX2PQPOmvUmuFhuAgpUQ2870daNV2fau!jgrqKTmcOOq9uRGt+zUrhkuIboP+xwdPpv0P1Tfw+Q==>
to report this email as spam.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel