For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > July 2004 > umount function call on Sola









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author umount function call on Sola
Bigdakine

2004-07-28, 9:05 pm


I have code which requires the remote mount of a file system. Before accessing
this file system, this code first checks to see if the file server is alive. If
so, then it goes ahead and does what it needs to do on the remote file system.
Mounting this remote file system is done by the automounter.

If the file server isn't alive, I'd like this code to then umount this file
system if it is already mounted.

So as a little test, I made a small c-program which calls umount, and unmounts
a particular file system. Before running I do an ls -l on the file system which
causes it to be mounted, and then I execute the code as root. I get an error
code of zero on return.

I then run df -k, not expecting to see the remote file system present. What I
actually see is pretty weird.

server:/export/junk 0 0 0 0% /export/junk

I did an ls -l again, and then ran the code again. df -k shows two lines like
the one above.

Is there something else I should be doing besides the call to umount? Is this
perhaps do the fact that the remote fs was mounted by the automounter?

Thanks in advance,

Stuart
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com