[comp.protocols.nfs] Various Questions re: PC-NFS, etc.

moorej@dvinci.usask.ca (Jonathan Moore) (12/07/89)

Hello.

I have a few questions which are all loosely related, so I will put them
all in one posting.

First, some background. I am running a Sun 3/60 as a file server for a
medium-sized PC network (~40 MS-DOS machines) in a microcomputer lab. The 
PC's are running PC-NFS 3.01. The 3/60 is running SunOS 4.0.3. I have various 
home-grown RPC programs running on the server which seem to run OK.

Now for the questions:

	1) Every so often (about once a week or so), clients stop being
	able to mount the server's disks. Terminal sessions are still OK.
	This affects the PC-NFS clients as well as other UNIX servers. 
	Nothing I try short of rebooting the server can fix the problem. 
	Is there something less drastic that can be done about this? Is
	something perhaps conflicting with the NFS stuff?
	
	2) The /etc/rmtab file on the server seems to grow (and grow...).
	Many of the entries have a hash character in them. The file temds
	to look something like:
	
		.
		.
		#kul13:/dos
		#kul18:/dos
		skul21:/dos
		.
		.
		
	I assume PC-NFS is putting the "#" hash characters in the lines
	when a PC client unmounts (or maybe when it dies). Is this
	something to cause concern? Can I just periodically trash this
	file (It gets to be >1 Mb)?
	
	3) Another PC-NFS question. Is there any way to (somewhat
	accurately) account for usage under PC-NFS? It would be advantageous
	to be able to track how much the lab is being used and by whom.
	However, it seems that the stateless nature of NFS makes this type
	of accounting impossible, since the server doesn't keep track of
	what the clients are doing. I have tried running a simple accounting 
	system that starts up when the PC is booted, and stops when the user
	logs out (there is a "logout" program that, among other things, tells
	the accounting program the user is done). However, this has problems,
	since the users often turn off the machine prematurely, or it crashes
	altogether. Any insight anyone has into NFS-type accounting would
	be greatly appreciated.
	
I would appreciate any comments/answers/etc regarding any of these questions
that anyone may have.

Thanks very much in advance,
Jonathan.

-- 
|--- Jonathan Moore  ------------------|--  Voice: (306) 966-5295 ---------|
|    College of Engineering            |                                   |
|    University of Saskatchewan        |    Email: moorej@sask.usask.CA    |
|___ Saskatoon, Canada  S7N 0W0________|__________ moorej@dvinci.usask.CA _|

geoff@hinode.East.Sun.COM (Geoff Arnold @ Sun BOS - R.H. coast near the top) (12/07/89)

In article <1989Dec6.163953.20378@dvinci.usask.ca> moorej@dvinci.usask.ca (Jonathan Moore) writes:
>	1) Every so often (about once a week or so), clients stop being
>	able to mount the server's disks. Terminal sessions are still OK.
>	This affects the PC-NFS clients as well as other UNIX servers. 
>	Nothing I try short of rebooting the server can fix the problem. 
>	Is there something less drastic that can be done about this? Is
>	something perhaps conflicting with the NFS stuff?

There's not enough information to go on here. Is the mount daemon
still running? (Try "showmount -e hostname".) Are the nfsd daemons hosed?
(Check with ps ax.) Is it only mounting that fails, or are existing
mounts screwed up? Are there any anomalous stats shown by "nfsstat -s"?
Etc. Etc.

>	2) The /etc/rmtab file on the server seems to grow (and grow...).
>	Many of the entries have a hash character in them. 
>		.
>		
>	I assume PC-NFS is putting the "#" hash characters in the lines
>	when a PC client unmounts (or maybe when it dies). Is this
>	something to cause concern? Can I just periodically trash this
>	file (It gets to be >1 Mb)?

Way back when (when? maybe SunOS 3.x.) I thought that "rpc.mountd" tried
to actually delete entries from /etc/rmtab, but maybe I was dreaming...
Anyway, the SunOS 4.0 code includes the fragment:

void
rmtab_delete(pos)
        long pos;
{
        if (f != NULL && pos != -1 && fseek(f, pos, 0) == 0) {
                fprintf(f, "#");
                fflush(f);
        }
}

which is responsible for the '#' lines. I suggest that you just trash
the file if it gets too big - it's purely advisory, anyway.

BTW, PC-NFS isn't writing anything - it's the rpc.mountd on the server.
>	
>	3) Another PC-NFS question. Is there any way to (somewhat
>	accurately) account for usage under PC-NFS? It would be advantageous
>	to be able to track how much the lab is being used and by whom.

The only straightforward solution to this seems to be to write
a little DOS TSR that is kicked off when you log in and which opens
an NFS-mounted file and periodically stuffs a timestamp in there.
This would run until logout or (obviously) power-off.
A Unix program can then browse these files and compute the usage.
The TSR would look a little like the print redirector in structure.

Taking advantage of NFS seems the best way to keep the size down.

Geoff Arnold, PCDS Group,     | Quote of the week: "Shut up and mind your
Sun Microsystems Inc.         | Canadian business, you meddlesome foreigner."
Internet: geoff@East.Sun.COM  | (Theodore A.Kaldis, <kaldis@topaz.rutgers.edu>
Disclaimer: Obviously....     | on Nov. 22 1989, in reply to Joe Nunes.)