Printer FriendlyEmail Article Link

How to setup a simple NFS test on the Avalanche client to log in, create, write and read a file on the server?

Answer

The article assumes your Avalanche Client IP addresses, subnet, GW, VLAN, etc have been setup correctly.  The following is an example of the actions needed for a client to log into an NFS server at 192.254.219.  The directory or subdirectory tree on the server to which the client will be mounted is vol1.  The AUTH_FLAVOR is NONE which denotes null or anonymous authentication.  The MACHINE_NAME is SPIRENT_server003 which is the client's host name used to identify the machine for all authentication types.  The READ_BLOCK_SIZE is the preferred size in bytes of a READ request.  The WRITE_BLOCK is the preferred size in bytes of a WRITE request.  The server mount port is 635 (this is an example of the mount port on the server).  IMPORTANT - You must enter the correct mount port number being used by your server; otherwise mount will fail.  See below on how to look up the mount port on the server. 

NFS actions example:

nfs://192.254.219.1:/vol1 AUTH_FLAVOR=NONE MACHINE_NAME=SPIRENT_server003 READ_BLOCK_SIZE=32768 WRITE_BLOCK_SIZE=32768 MOUNT_PORT=635
NFS_SUB_CMD CREATE NEW_FILENAME=spirent.txt
NFS_SUB_CMD WRITE FILENAME=spirent.txt BYTE_SIZE=10240000 INPUT_SOURCE=ON_THE_FLY STABLE_FLAG=UNSTABLE
NFS_SUB_CMD READ FILENAME=spirent.txt

The NFS subcommands will create a new file call spirent.txt, next write to the file and finally read from the file.  For more information on NFS commands please see Avalanche Help from the Avalanche Commander application HELP. 
 

Unix command for looking up the mount port. 

The Avalanche client does not support portmapper (port 111) where the mount port is discovered.  To look up the mount port on a nfs server, please use the command rpcinfo -p.

Example:
Run the command from a client, where the NFS server is at 192.167.20.1.  If command is issued on the NFS server, omit the server IP address. 
rpcinfo -p  192.167.20.1

you will get something like this

    100000    2   tcp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  40742  status
    100024    1   tcp  41776  status
    100021    1   udp  46379  nlockmgr
    100021    3   udp  46379  nlockmgr
    100021    4   udp  46379  nlockmgr
    100021    1   tcp  44707  nlockmgr
    100021    3   tcp  44707  nlockmgr
    100021    4   tcp  44707  nlockmgr
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049
    100227    3   tcp   2049
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049
    100227    3   udp   2049
    100005    1   udp  44823  mountd
    100005    1   tcp  52957  mountd
    100005    2   udp  44823  mountd
    100005    2   tcp  52957  mountd
    100005    3   udp  44823  mountd
    100005    3   tcp  52957  mountd

In the example the mount port is 52957.      

Note:  If the Avalanche client uses the wrong mount port, the server will not accept the mount request. In the mount reply, you will see the NFS server returns with error code "remote hasn't exported program".

 


Product : Avalanche,Avalanche