Check from Client if NFS is running on Server











up vote
1
down vote

favorite












(my systems are running centos7)



I'm trying to check from the client if drives are mounted properly over NFS.



Typing the command nfsstat -m gives me the mounts that it thinks are currently mounted, but this is no guarantee that those folders are accessible. It could just be that the nfs server was running when those folders were mounted but that the nfs server is down now.



For example if the nfs server goes down and on the client machine I type df -h then the command will hang indefinitely. Likewise, if I try to ls the folder I'm trying to mount then it too will hang indefinitely.



Here's an example that shows my problem



# on server
systemctl start nfs-server

# on client
mount node1:/mnt/images /mnt/images
df -h #works fine here

# on server
systemctl stop nfs-server

# on client
nfsstat -m #shows the list of nfs mounts
df -h #this command will hang
ls /mnt/images #this command will hang


Any suggestions on how to test if from the client side if the NSF server is running or if the NSF mounted folders are accessible would be greatly appreciated.



UPDATE



If I run showmount -e on the server I get this output (note /mnt/images and /mnt/rv_output and /rv are all folders I'm trying to mount from my client machines)



/mnt/rv_output 192.168.81.0/24
/mnt/images 192.168.81.0/24
/rv 192.168.81.0/24


But I'm not interested in testing this connection on the Server, I want to test it on the client machines. If I run showmount -e on the client I get the same output irregardless of where the nfs-server has been activated from the Server computer.



clin_create: RPC: Port mapper failure - Unable to receive: errno 111 (connection refused)









share|improve this question
























  • You are supposed to run showmount -e server on the client.
    – meuh
    Nov 2 '17 at 19:58















up vote
1
down vote

favorite












(my systems are running centos7)



I'm trying to check from the client if drives are mounted properly over NFS.



Typing the command nfsstat -m gives me the mounts that it thinks are currently mounted, but this is no guarantee that those folders are accessible. It could just be that the nfs server was running when those folders were mounted but that the nfs server is down now.



For example if the nfs server goes down and on the client machine I type df -h then the command will hang indefinitely. Likewise, if I try to ls the folder I'm trying to mount then it too will hang indefinitely.



Here's an example that shows my problem



# on server
systemctl start nfs-server

# on client
mount node1:/mnt/images /mnt/images
df -h #works fine here

# on server
systemctl stop nfs-server

# on client
nfsstat -m #shows the list of nfs mounts
df -h #this command will hang
ls /mnt/images #this command will hang


Any suggestions on how to test if from the client side if the NSF server is running or if the NSF mounted folders are accessible would be greatly appreciated.



UPDATE



If I run showmount -e on the server I get this output (note /mnt/images and /mnt/rv_output and /rv are all folders I'm trying to mount from my client machines)



/mnt/rv_output 192.168.81.0/24
/mnt/images 192.168.81.0/24
/rv 192.168.81.0/24


But I'm not interested in testing this connection on the Server, I want to test it on the client machines. If I run showmount -e on the client I get the same output irregardless of where the nfs-server has been activated from the Server computer.



clin_create: RPC: Port mapper failure - Unable to receive: errno 111 (connection refused)









share|improve this question
























  • You are supposed to run showmount -e server on the client.
    – meuh
    Nov 2 '17 at 19:58













up vote
1
down vote

favorite









up vote
1
down vote

favorite











(my systems are running centos7)



I'm trying to check from the client if drives are mounted properly over NFS.



Typing the command nfsstat -m gives me the mounts that it thinks are currently mounted, but this is no guarantee that those folders are accessible. It could just be that the nfs server was running when those folders were mounted but that the nfs server is down now.



For example if the nfs server goes down and on the client machine I type df -h then the command will hang indefinitely. Likewise, if I try to ls the folder I'm trying to mount then it too will hang indefinitely.



Here's an example that shows my problem



# on server
systemctl start nfs-server

# on client
mount node1:/mnt/images /mnt/images
df -h #works fine here

# on server
systemctl stop nfs-server

# on client
nfsstat -m #shows the list of nfs mounts
df -h #this command will hang
ls /mnt/images #this command will hang


Any suggestions on how to test if from the client side if the NSF server is running or if the NSF mounted folders are accessible would be greatly appreciated.



UPDATE



If I run showmount -e on the server I get this output (note /mnt/images and /mnt/rv_output and /rv are all folders I'm trying to mount from my client machines)



/mnt/rv_output 192.168.81.0/24
/mnt/images 192.168.81.0/24
/rv 192.168.81.0/24


But I'm not interested in testing this connection on the Server, I want to test it on the client machines. If I run showmount -e on the client I get the same output irregardless of where the nfs-server has been activated from the Server computer.



clin_create: RPC: Port mapper failure - Unable to receive: errno 111 (connection refused)









share|improve this question















(my systems are running centos7)



I'm trying to check from the client if drives are mounted properly over NFS.



Typing the command nfsstat -m gives me the mounts that it thinks are currently mounted, but this is no guarantee that those folders are accessible. It could just be that the nfs server was running when those folders were mounted but that the nfs server is down now.



For example if the nfs server goes down and on the client machine I type df -h then the command will hang indefinitely. Likewise, if I try to ls the folder I'm trying to mount then it too will hang indefinitely.



Here's an example that shows my problem



# on server
systemctl start nfs-server

# on client
mount node1:/mnt/images /mnt/images
df -h #works fine here

# on server
systemctl stop nfs-server

# on client
nfsstat -m #shows the list of nfs mounts
df -h #this command will hang
ls /mnt/images #this command will hang


Any suggestions on how to test if from the client side if the NSF server is running or if the NSF mounted folders are accessible would be greatly appreciated.



UPDATE



If I run showmount -e on the server I get this output (note /mnt/images and /mnt/rv_output and /rv are all folders I'm trying to mount from my client machines)



/mnt/rv_output 192.168.81.0/24
/mnt/images 192.168.81.0/24
/rv 192.168.81.0/24


But I'm not interested in testing this connection on the Server, I want to test it on the client machines. If I run showmount -e on the client I get the same output irregardless of where the nfs-server has been activated from the Server computer.



clin_create: RPC: Port mapper failure - Unable to receive: errno 111 (connection refused)






centos mount nfs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 2 '17 at 16:43

























asked Nov 2 '17 at 15:01









Stanton

1063




1063












  • You are supposed to run showmount -e server on the client.
    – meuh
    Nov 2 '17 at 19:58


















  • You are supposed to run showmount -e server on the client.
    – meuh
    Nov 2 '17 at 19:58
















You are supposed to run showmount -e server on the client.
– meuh
Nov 2 '17 at 19:58




You are supposed to run showmount -e server on the client.
– meuh
Nov 2 '17 at 19:58










1 Answer
1






active

oldest

votes

















up vote
0
down vote













showmount



from man showmount




showmount - show mount information for an NFS server




I use with --exports ( or -e ) option to see what is actually exported.






share|improve this answer





















  • This didn't help as it displays the same result on the Client machines whether the NFS-server was running or not on the Server machine. See my update.
    – Stanton
    Nov 2 '17 at 16:44











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f402077%2fcheck-from-client-if-nfs-is-running-on-server%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













showmount



from man showmount




showmount - show mount information for an NFS server




I use with --exports ( or -e ) option to see what is actually exported.






share|improve this answer





















  • This didn't help as it displays the same result on the Client machines whether the NFS-server was running or not on the Server machine. See my update.
    – Stanton
    Nov 2 '17 at 16:44















up vote
0
down vote













showmount



from man showmount




showmount - show mount information for an NFS server




I use with --exports ( or -e ) option to see what is actually exported.






share|improve this answer





















  • This didn't help as it displays the same result on the Client machines whether the NFS-server was running or not on the Server machine. See my update.
    – Stanton
    Nov 2 '17 at 16:44













up vote
0
down vote










up vote
0
down vote









showmount



from man showmount




showmount - show mount information for an NFS server




I use with --exports ( or -e ) option to see what is actually exported.






share|improve this answer












showmount



from man showmount




showmount - show mount information for an NFS server




I use with --exports ( or -e ) option to see what is actually exported.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 2 '17 at 15:29









Archemar

19.4k93469




19.4k93469












  • This didn't help as it displays the same result on the Client machines whether the NFS-server was running or not on the Server machine. See my update.
    – Stanton
    Nov 2 '17 at 16:44


















  • This didn't help as it displays the same result on the Client machines whether the NFS-server was running or not on the Server machine. See my update.
    – Stanton
    Nov 2 '17 at 16:44
















This didn't help as it displays the same result on the Client machines whether the NFS-server was running or not on the Server machine. See my update.
– Stanton
Nov 2 '17 at 16:44




This didn't help as it displays the same result on the Client machines whether the NFS-server was running or not on the Server machine. See my update.
– Stanton
Nov 2 '17 at 16:44


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f402077%2fcheck-from-client-if-nfs-is-running-on-server%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

サソリ

広島県道265号伴広島線

Accessing regular linux commands in Huawei's Dopra Linux