Unix/Linux

Solving the "System call error number -1" when you try to mount a NFS

steloflute 2013. 7. 5. 23:30

https://www.ibm.com/developerworks/community/blogs/torator/entry/solving_the_system_call_error_number_1_when_you_try_to_mount_a_nfs4?lang=en

 

 

Sometimes, when you try to mount a NFS on your server (even using the IP instead of hostname) you get the following error:

I'm trying to mount a NFS on my server (hostname: server02 / IP: 10.0.10.16), that are exported by another server (hostname: server01 / IP: 10.0.10.15 )

torator@server02:/home/torator # sudo mount 10.0.10.15:/tmp/TL12SP07 /TL
nfsmnthelp: 1831-019 10.0.10.15: System call error number -1.

mount: 1831-008 giving up on:
10.0.10.15:/tmp/TL12SP07
System call error number -1.

torator@server02:/home/torator #


How to solve this? It's very simple, you need to add on both servers an entry on /etc/hosts file

On server01:

10.0.10.16 server02

On server02:

10.0.10.15 server01


After that, it's possible to mount the NFS

torator@server02:/home/torator # sudo mount 10.0.10.15:/tmp/TL12SP07 /TL
torator@server02:/home/torator # df -g /TL
Filesystem GB blocks Free %Used Iused %Iused Mounted on
10.0.10.15:/tmp/TL12SP07 10.00 9.0 10% 2110 44% /TL
torator@server02:/home/torator #
I expected that this can help you ;)