Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Unmounting NFS idle clients from server Post 302910470 by satish51392111 on Thursday 24th of July 2014 05:30:29 PM
Old 07-24-2014
Unmounting NFS idle clients from server

Hello World,

We have a software repository server in our environment which we use as an NFS server.
Now this has been going on well before I was hired. Now, I observed many users not unmounting the NFS resources after their use. I ran showmount and it showed 513 current sessions.
Smilie Is there a way I could know the idle clients (i.e., which haven't been using the mounted NFS resources)?

I thought of a solution - I would automate a script in which I be unmounting all the NFS directories using ssh. So, if the client is still using, the unmount would automatically be declined.

The problem here is I need to enter the password (and even type 'yes' to save RSA key fingerprint) for each of the 513 attempts. Is there a way to automate this? I had tried 'sshpass' but it completely fails.

Could someone help me complete my script? Or this there a better way to automate remote unmounting (no nfs restart/reload please)?

Last edited by satish51392111; 07-24-2014 at 06:37 PM..
 

9 More Discussions You Might Find Interesting

1. Solaris

Solaris 8 server and Jumpstarting 2.6 clients

Ladies and Gentlemen: I have successfully configured a Solaris 8 server with Jumpstart! I can Jumpstart Solaris 8 client systems with no problem. My configuration is as follows: Jumpstart Server: Solaris 8 patched with Recommended Patches from June 05. I have installed Solaris 8 in... (4 Replies)
Discussion started by: rambo15
4 Replies

2. AIX

IPsec from one AIX server to many windows clients

I work for a fairly large organization who recently tasked me with securing our telnet services with IPsec. We have a large mixed environment where most of our servers are running unsecured telnet. ssh was my first suggestion but because of the cost of purchasing an enterprise license for a fips... (2 Replies)
Discussion started by: dgaixsysadm
2 Replies

3. Solaris

Solaris 9 as a nfs client -- centos as a nfs server.

Hello, I have a centos as nfs server, its name is centos_A. After I finish the setup of the nfs server, the other linux can access this nfs server immediately via /net/centos_A/* But, My solaris 9 can not access /net/centos_A/* immediately. I have to leave /net/centos_A, and wait for about... (1 Reply)
Discussion started by: bruceharbin
1 Replies

4. AIX

Unmounting a failed NFS mount

I have an NFS file system mounted on one of my AIX servers with "mount -v cifs".. The server from which the file system was mounted has crashed and now my "df -g" output is hanging. Is there any was to unmount this NFS file system? I have tried "umount -f". Doesn't work. Or is there any way in... (6 Replies)
Discussion started by: wibhore
6 Replies

5. UNIX for Advanced & Expert Users

Quest on NFS with 1 Server & 2 Clients

Hello; I work now with a team which has based her "applications" on the following schema: 1 NFS client C1 (linux redhat 5) writes a file fic.dat on a NFS SERVER S (RH 5) Another NFS client C2 is waiting for the same file fic.dat (on NFS server S1), and, when "fic.dat" appears, then makes... (8 Replies)
Discussion started by: SolarMax
8 Replies

6. IP Networking

Some clients cannot ping UNIX server

All of sudden in this morning, some computers could not connect to our UNIX server while other still could. Some computers could ping the server while some could not. Same on the server side. It could ping some clients but not some. All Windows clients could ping each other. And more, the... (1 Reply)
Discussion started by: jonapa
1 Replies

7. Programming

Clients - Server ( UDP )

Hello, I have a question: I want to create a n client to one server connection. This is the client-server algorithm. Enybody help to make the changes? (0 Replies)
Discussion started by: MaHmur
0 Replies

8. Solaris

NFS with a NAS: permanently inconsistent directory state across clients

Hi, I am having some NFS directory consistency problems with the below setup on a local (192.) network: 1. Different permissions (chmod) for the same NFS dir are reflected on different clients. 2. (more serious) an NFS dir created on client1 cannot be accessed on client2; this applies to some... (10 Replies)
Discussion started by: cosmojetz
10 Replies

9. AIX

AIX NFS Server and NFS Client

Hi 2 ALL, try to run NFS Server in AIX 7.1 : 1. Step by step on NFS Server node mkdir /tmp/test chgrp staff /tmp/test chmod 775 /tmp/test-- create export directory (fs) mknfsexp -d /tmp/test -t ro exportfs -va show mount -e :/# exportfs -av exports: 1831-187 re-exported /tmp/test... (4 Replies)
Discussion started by: penchev
4 Replies
showmount(8)						      System Manager's Manual						      showmount(8)

NAME
showmount - Shows remote NFS compatible mounts on a host SYNOPSIS
showmount [-adeT] [-t nnn] [host] FLAGS
Lists all mount points in the form: hostname:dirpath. In this form, hostname is the name of a client that has remotely mounted a directory from an NFS server, and dirpath is the directory that has been mounted. Lists only directories that have been remotely mounted by clients. Shows host's exports list. Specifies an infinite timeout. The default timeout value is 25 seconds. Specifies a timeout value, in sec- onds. The default timeout value is 25 seconds. The default value for host is the current hostname. DESCRIPTION
The showmount command shows status information about the NFS server on host. By default, it prints the names of all hosts that have NFS file systems mounted from the server host. See NFS: Network File System Protocol Specification, RFC1094, Appendix A for a detailed description of the protocol. NOTES
The mountd daemon running on the server only has an idea of the actual mounts, since the NFS server is stateless. showmount will only dis- play the information as accurately as the mount daemon reports it. The default timeout value of 25 seconds can be too brief to read and verify an export list. If you receive timeout messages when using the showmount -e command, use either the -T or the -t options to increase the timeout value. FILES
Specifies the command path Contains a table of local file systems mounted by remote NFS clients RELATED INFORMATION
Commands: mount(8) Daemons: mountd(8) Files: mountdtab(4) delim off showmount(8)
All times are GMT -4. The time now is 04:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy