Skip to content
Patrice LUCAS edited this page Jun 13, 2019 · 5 revisions

This wiki page is dedicated to explain a simple way to set a client/ganesha proxy/server configuration using one simple node to be able to test the FSAL_PROXY.

Start an NFS server

A simple /etc/exports file as the following one would be sufficient and fit perfectly to export "/tmp" :

/tmp *(rw,insecure,no_root_squash)

Start a ganesha FSAL_PROXY server

The following ganesha configuration file would fit to re-export on the same node the "tmp" file :

NFS_CORE_PARAM {
        #local test of fsal_proxy with a local knfsd on 2049
        NFS_Port = 2050;
}

EXPORT_DEFAULTS {
        Protocols = 9P, 3, 4;
}

EXPORT
{
        # Export Id (mandatory, each EXPORT must have a unique Export_Id)
        Export_Id = 77;

        # Exported path (mandatory)
        Path = /tmp;

        # Pseudo Path (required for NFS v4)
        Pseudo = /tmp_proxy;

        # Required for access (default is None)
        # Could use CLIENT blocks instead
        Access_Type = RW;
        Squash = no_root_squash;

        # Exporting FSAL   
        FSAL {
                Name = PROXY;
                Srv_Addr = 127.0.0.1;
                Use_Privileged_Client_Port = true;
        }
}

LOG {   
        COMPONENTS {
        #    ALL = FULL_DEBUG;
    }
}

NFSV4 { 
        GRACELESS = true;
}

PROXY {
        Remote_Server {
                
        }
}

You can run ganesha as root in foreground or not, in gdb or not ...

Mount your local client

For example to mount a local NFSv4.1 client on "/mnt/tmp" , you can do it with the following root command :

mount -t nfs -o vers=4.1,port=2050 localhost:/tmp_proxy /mnt/tmp

You're ready to run your test (cthon for example ...) using the /mnt/tmp directory.

Of course, you can mount the final client by using other protocols NFSv4.0, NFSv3 or 9P ...

Clone this wiki locally