• Post Reply Bookmark Topic Watch Topic
  • New Topic

NFS and Samba Mountings  RSS feed

 
Z Zia
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a 3 tiers solutions; first 2 are on Linux, third on Windows. I have NFS mapping and Samba Mappings on these systems.

Question:

To prevent unmount; I have scheduled 'nfs' and 'smb' to restart every 5 minutes. Is this a good stretegy. How other people work around for such problems.
 
M Beck
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what on earth would cause a network FS mount to umount every five minutes? neither NFS nor SMB work that way; once you've mounted a network filesystem, it should stay mounted until you specifically umount it. there should be no need to periodically do anything to keep it mounted.

and why on earth would restarting the network FS servers keep a current FS mounting mounted? if anything, i'd think doing that would umount every network FS that server was managing.
 
Z Zia
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don't have exposure of working on projects involving more than your home pc, please don't post replies.

A good alternative may be watching Harry Potter.
 
Tim Holloway
Saloon Keeper
Posts: 18797
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think that "M Beck's" response was intended to be as rude as perhaps it sounded.

Please remember. The JavaRanch is the friendly place. There's lots of other BBS's available for those who prefer to live in the flames.
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll admit that my only experience with NFS and Samba is with tinkering on a personal network at home. At the moment, I only use NFS as I haven't had success in getting Samba back up and running after reconfiguring my primary file server.

Anyway, I have the same questions as M Beck. What would cause a filesystem to unmount that you don't have control over? I don't have any such "restarting process" running on my home system and have never encountered such problems. I have one NFS directory that automounts at boot time, and afaik, the only way to unmount it is to run the umount command as root. Of course, if the file server loses power, the filesystem will be unmounted as well, but in my situation, the computer that needs access to it will mostly likely lose power as well (in a power outage, say) or it will be because I physically flipped the switch on the file server.

With that said, I don't see any need to restart nfs and/or smb every five minutes, but I don't have much "real world" production experience so I may be missing something.

Layne
 
M Beck
Ranch Hand
Posts: 323
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i'm sorry if my reply sounded rude; it was not my intention to offend. but i was and am surprised not only by the problem, but also by the stated solution; i can't see how restarting a network filesystem server (either NFS or Samba) could possibly prevent a network filesystem from unexpectedly unmounting. if anything, i'd expect such a restart to cause a sudden umount.

if i wanted to make sure a filesystem remained mounted, i'd write a slow filesystem crawler -- a process whose job it was to slowly traverse the directories of the FS in question, just looking at the modification times of the files, one at a time. perhaps at the pace of one per second, or one every ten seconds. this would serve as a "keepalive" connection, and could also create instant error logs or alerts as soon as it found the FS unexpectedly disconnected.

the backdraw of such a crawler daemon, of course, would be that the FS would be harder to deliberately umount -- you'd have to stop the crawler first.
[ March 12, 2005: Message edited by: M Beck ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!