FSAL_PROXY aims to take benefit from the Ganesha server protocol layer and should be mounted in 9p, 4 and 4.1 .

Regards,
Patrice

On 09/14/17 16:33, Frank Filz wrote:

Hmm, we shouldn’t be requiring 4.1 for clients to mount PROXY. That actually would defeat one of the purposes of PROXY (to provide access to a server with NFS v3 or NFS v4.1 when the server did not support those versions.

Frank

*From:*Stephan Walter [mailto:stephan.wal...@emea.nec.com]
*Sent:* Thursday, September 14, 2017 6:19 AM
*To:* patrice.lu...@cea.fr; nfs-ganesha-devel@lists.sourceforge.net
*Subject:* Re: [Nfs-ganesha-devel] I RE: Setup/Configuration problem for a proxy with nfs-ganesha V2.6-dev.7

Hi all,

I was able to solve the problem with ‘VIM’.

The second last comment from ffilz at: https://github.com/nfs-ganesha/nfs-ganesha/issues/200

Brought me to the idea, that the Client mount could be the problem.

Therefore, I checked the mount with

                Sudo mount | grep ganesha

192.168.56.101:/nfs-ganesha-proxy on /home/swalter/ganesha-dummy type nfs4 (rw,relatime*,vers=4.0*,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.56.102,local_lock=none,addr=192.168.56.101)

So the nfs was mounted as nfs4.0 and not as nfs4.1

I changed therefore my mount command line to

                sudo mount -t nfs4 -o minorversion=1 192.168.56.101:/nfs-ganesha-proxy ./ganesha-dummy/ -v

                mount | grep ganesha

192.168.56.101:/nfs-ganesha-proxy on /home/swalter/ganesha-dummy type nfs4 (rw,relatime,*vers=4.1*,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=192.168.56.102,local_lock=none,addr=192.168.56.101

After this change, it is no longer a problem to create new files with vim.

I would highly recommend to add this information to the PROXY wiki page, since it very hard for new users to find this requirement.

Best regards,

Stephan

PS: I will further test the ganehsa-server -> ganesha-proxy -> nfs-client configuration

UPDATE:

Ok,  I was now able to test the above mentioned pure ganesha configuration. The problem with the proxy still exist.

*From:*Stephan Walter
*Sent:* 13 September 2017 15:19
*To:* Stephan Walter <stephan.wal...@emea.nec.com <mailto:stephan.wal...@emea.nec.com>>; patrice.lu...@cea.fr <mailto:patrice.lu...@cea.fr>; nfs-ganesha-devel@lists.sourceforge.net <mailto:nfs-ganesha-devel@lists.sourceforge.net> *Subject:* I RE: [Nfs-ganesha-devel] Setup/Configuration problem for a proxy with nfs-ganesha V2.6-dev.7

Hi all,

I have now tried to use the ganesha server instead of the nfs-kernel-server as initial exporter, but run into even more problems.

I stopped the nfs-kernel-server and then started the ganesha server with the following commandline and config file

                sudo ganesha.nfsd -f nfs-ganesha-build/test/ganesha.min_test.conf -L ./ganesha-export.logfile -N NIV_DEBUG –F

The ganehsa.min_test.conf is:

                EXPORT

{

        Export_Id = 2;

        Path = /home/swalter/nfs-org;

        Pseudo = /home/swalter/nfs-org;

        Access_Type = RW;

#        Squash = None;

        FSAL

        {

                Name = VFS;

       }

}

So this is equal to the basic config file.

I think the Ganesha server works fine, since I get the following output:

                Sudo showmount –e localhost

Export list for localhost:

/home/swalter/nfs-org (everyone)

Afterwards, I started the Ganesha-Proxy with the same config file as before – just another ip, since I have cloned the VM.

While the proxy start successfully when I use the nfs-kernel-server, it hangs with the ganesha server as source for the proxy.

I have seen, that there seems to be a problem with the xid, if I interpret the logfile in the right way. I attached the logfile of the proxy to this mail.

UPDATE:

nfs-kernel-server -> Ganesha-Proxy -> NFS-Client

I played also a bit around with the above configuration to debug, what lead to the corruption of the directory.

It seems, that I can remove files , copy and cat files as much as I want. Also I can use md5sum or so to access the data within the files. But when I try to use ‘VIM’ to save an existing file, or open a new one, I get the following error:

"foobar"

"foobar" E212: Can't open file for writing

Press ENTER or type command to continue

Now I get the following output for the ll commands on the client

ll

ls: reading directory '.': Permission denied

total 0

sudo ls -hal

ls: cannot open directory '.': Permission denied

cd ..  && ll

total 1040

drwx--x--x  3 swalter swalter    4096 Sep 13 14:51 ./

drwxr-xr-x 23 swalter swalter    4096 Sep 13 14:39 ../

-rw-r--r--  1 swalter swalter 1048576 Sep 13 14:15 1M.data

drw-------  2 swalter swalter    4096 Sep 13 14:52 barfoo/

-rw-r--r--  1 swalter swalter      42 Sep 13 14:15 md5sum.check

It has shown, that the barfoo directory has lost the X value, so that I no longer can access it. If I add it again with chmod 711 I can again access the directory and files

                Cd barfoo && ll

total 12

drwx--x--x 2 swalter swalter 4096 Sep 13 14:52 ./

drwx--x--x 3 swalter swalter 4096 Sep 13 14:51 ../

-rw-r--r-- 1 swalter swalter    7 Sep 13 14:27 barfoo

---------- 1 swalter swalter    0 Mai  3  1971 .foobar.swp

As we can see is there a swp file from vim without permissions.   I can now also access all the data and delete the directory again.

So it is not clear to me, why this happens.

Another interesting point is maybe the following

mkdir test

ll

drwxr-xr-x  2 swalter swalter  4096 Sep 13 14:39 test/

sudo mount -t nfs4 192.168.56.101:/nfs-ganesha-proxy ./test –v

ll

drwx--x--x  3 swalter swalter  4096 Sep 13 14:26 test/

So the permissions of the directory has changed. I don’t know, if this is correct or not. But I don’t think, that this is important, since the same error occurs, when I chance the permissions to 755 at the nfs-kernel-server, what also change all the permissions at the nfs-client.

Best regards,

Stephan

*From:*Stephan Walter [mailto:stephan.wal...@emea.nec.com]
*Sent:* 13 September 2017 11:31
*To:* patrice.lu...@cea.fr <mailto:patrice.lu...@cea.fr>; nfs-ganesha-devel@lists.sourceforge.net <mailto:nfs-ganesha-devel@lists.sourceforge.net> *Subject:* [** SUSPICIOUS EMAIL **] Re: [Nfs-ganesha-devel] Setup/Configuration problem for a proxy with nfs-ganesha V2.6-dev.7

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 <mailto: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%21jgrqKTmcOOq9uRGt+zUrhkuIboP+xwdPpv0P1Tfw+Q==>to report this email as spam.


<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=icon> Virus-free. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=link>

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


--
Patrice LUCAS
Ingenieur-Chercheur, CEA-DAM/DSSI/SISR/LA2S
tel : +33 (0)1 69 26 47 86
e-mail : patrice.lu...@cea.fr

------------------------------------------------------------------------------
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

Reply via email to