Hi,
I wrote a script to mount a nfs share to backup linux servers :
Code:
...
# Creating the tunnel
affiche_action "Tunneling"
ssh -f -L${NFSPORT}:${IPSERV}:2049 -L${NFSMOUNTPORT}:${IPSERV}:32767 -l sauvegarde ${IPSERV} sleep 60
affiche_resultat $? || quit 1
# Montage du partage nfs
affiche_action "Mount nfs share to $SERVER"
mkdir $REP
mount -v -t nfs -o tcp,sync,rsize=8192,wsize=8192,soft,timeo=60,port=$NFSPORT,mountport=$NFSMOUNTPORT $SERVER $REP
affiche_resultat $? || quit 1
...
I've many servers, and it works fine for some, but two won't mount the nfs.
1st server :
When i run the script above, i obtain this :
Code:
Tunneling ........... [OK]
Mount nfs share to localhost:/images ...........
mount -v -t nfs -o tcp,sync,rsize=8192,wsize=8192,soft,timeo=60,port=38000,mountport=38001 localhost:/images /tmp/save.4979
mount to NFS server 'localhost' failed: possible invalid protocol.
RPC Error: 15 ( le programme n'est pas enregistré )
[KO]
When i mount directly the nfs (without tunneling it in ssh), it works.
Is anyone have an idea?
2nd server
Here is my error message :
Code:
Tunneling ........... [OK]
Mount nfs share to localhost:/images ...........
mount -v -t nfs -o tcp,sync,rsize=8192,wsize=8192,soft,timeo=60,port=38000,mountport=38001 localhost:/images /tmp/save.17346
mount to NFS server 'localhost' failed: server is down.
[KO]
From the client i tried telnet on portmap on the server, and i get connected.
I can't try to mount directly the nfs without tunneling because the client and server are in different networks and network team won't open other ports than 111 and 22 for the saves.
Thanks