LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-14-2010, 01:52 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
How to monitor that CIFS file systems are mounted


Hello all.


We recently had an issue with "cat /proc/mount" telling us that a CIFS file system was mounted, even though the mount was not working correctly. So we're not sure if we can trust linux to report malfunctioning mounts, so we're planning on adding a specific file on the mounted file system, and verify the mount by reading this file from the client side (linux). If linux fails to read it, we know that the mount have failed.

But before we go ahead doing this I thought I'd just hear how others are doing this sort of thing - how do you make sure that mount points are up and working?


- kenneho



EDIT: I just saw that I've posted in the security area, not in the server area. How do I move it?

Last edited by kenneho; 01-14-2010 at 01:53 AM.
 
Old 01-14-2010, 07:10 AM   #2
clvic
Member
 
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Blog Entries: 2

Rep: Reputation: 45
The utility monit (http://mmonit.com/monit/) has this interesting feature:
check directory
Choose a directory in your filesystem that must exist, or create one purposely, and monit will check its presence for you. You can even specify which actions to perform in case of insuccess, receiving report emails and so on... I think this is one of the best solutions for you.
 
Old 01-14-2010, 02:03 PM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Moved to Server for more adequate exposure.
 
Old 01-15-2010, 02:02 AM   #4
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by clvic View Post
The utility monit (http://mmonit.com/monit/) has this interesting feature:
check directory
Choose a directory in your filesystem that must exist, or create one purposely, and monit will check its presence for you. You can even specify which actions to perform in case of insuccess, receiving report emails and so on... I think this is one of the best solutions for you.
Thanks for your reply.

Seems like that tool can easily be replaced by a simple script that checks for the presenece of a file or folder, so I think I'd go with that instead. But thanks anyway.
 
Old 01-15-2010, 02:10 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
I would suggest reading through your /var/log/messages file for log entries between when the cifs mount started and when you learned it wasn't mounted. What was the failure? You may have a successful mount at one point but have the session destroyed for some reason later. If it is a home grade NAS device that is mounted, perhaps the drive spun down. In other words, the mount may have been initially successful, but until accessing it failed, neither you nor the kernel would know otherwise.

There may be messages on the server as well that could provide better some clues as well.
 
Old 01-15-2010, 02:26 AM   #6
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Quote:
Originally Posted by jschiwal View Post
I would suggest reading through your /var/log/messages file for log entries between when the cifs mount started and when you learned it wasn't mounted. What was the failure? You may have a successful mount at one point but have the session destroyed for some reason later. If it is a home grade NAS device that is mounted, perhaps the drive spun down. In other words, the mount may have been initially successful, but until accessing it failed, neither you nor the kernel would know otherwise.

There may be messages on the server as well that could provide better some clues as well.
Thanks. I actually allready monitor syslog messages, but didn't find any indication there about the failed mountpoint. I did get a warning about a unknown attribute (umask) in my mount command, but this have not caused the mount to fail before. So I can't find any problems in syslog regarding this issue.
 
Old 01-17-2010, 09:36 AM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
How about errors on the server side. My first guess is that the session is being dropped. What error is there trying to access the share?

Last edited by jschiwal; 01-19-2010 at 06:59 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NFS export multiple mounted file systems under a single root AdamDaughterson Linux - Server 2 07-28-2009 01:28 PM
How to Mount bin and sbin directories as readonly mounted file systems Larry James Fedora 8 10-21-2008 11:40 AM
Don't displaying images from a Mounted CIFS folder GSound Linux - Server 2 10-19-2007 12:17 PM
Mounting CIFS file systems at boot with Slackware 12.0 allend Slackware 6 10-09-2007 03:32 PM
mount: too many mounted file systems ferdinand2 Linux - Hardware 0 01-23-2006 12:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration