Operating System - HP-UX
1755363 Members
3831 Online
108832 Solutions
New Discussion юеВ

Re: Cleaning up the /etc/rmtab on the fly

 
generic_1
Respected Contributor

Cleaning up the /etc/rmtab on the fly

Hello,
Does anyone know how to cleanup the /etc/rmtab without bringing the mountd down?
I am running 11.11 but i noticed that it mentioned cleanup on this patch, so that rmtab doesnt fill up root on 10.20 This is the link that describes it. How is this cleanup triggered?
Here is the link
http://www.google.com/search?hl=en&lr=&biw=1022&q=clean+rmtab+online&btnG=Search

Next is there a way to actually edit the rmtab and force it to be read as the live copy without trashing the existing mounts on a server?

Hopefully someone here knows the internels of this code well :).

Thanks
4 REPLIES 4
Mel Burslan
Honored Contributor

Re: Cleaning up the /etc/rmtab on the fly

Jeff,

If you read the man page of rmtab, you will see this text:

This table only preserves information between crashes, and is read
only by mountd when it starts (see mountd(1M)). mountd keeps an in-
core table to handle requests from commands such as showmount and
shutdown

so, according to this text, mountd does not actively use the file. It just reads it at the startup time. Also, the very same man page says:

WARNINGS
Although the rmtab table is close to the truth, it is not always
totally accurate.

which reinforces my belief.

Having said that, just in the case it was kept open by some process that I do not know, it might not be cool to just plain 'rm' the file but I do not see anything wrong with something like :

grep -v ^# /etc/rmtab > /tmp/111; cat /tmp/111 > /etc/rmtab

or

> /etc/rmtab # to wipe it out totally

________________________________
UNIX because I majored in cryptology...
generic_1
Respected Contributor

Re: Cleaning up the /etc/rmtab on the fly

Does anyone have any code hooks to force it to reread :) as if it was starting up, which wont be in the man page?
Sandman!
Honored Contributor

Re: Cleaning up the /etc/rmtab on the fly

The only way to forcibly cleanup the /etc/rmtab file on the NFS server is to use the following procedure:

1) Make sure that no NFS clients are mounting any exported filesystems
2) Kill the rpc.mountd daemon
3) Remove the /etc/rmtab file
4) Restart the rpc.mountd daemon
generic_1
Respected Contributor

Re: Cleaning up the /etc/rmtab on the fly

If I only removed the stale entries and there were clients still mounted, other then the mount being unavailable for a moment is this true?