Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-14-2010, 01:52 AM
|
#1
|
Member
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657
Rep:
|
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.
|
|
|
01-14-2010, 07:10 AM
|
#2
|
Member
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Rep:
|
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.
|
|
|
01-14-2010, 02:03 PM
|
#3
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
Moved to Server for more adequate exposure.
|
|
|
01-15-2010, 02:02 AM
|
#4
|
Member
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657
Original Poster
Rep:
|
Quote:
Originally Posted by clvic
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.
|
|
|
01-15-2010, 02:10 AM
|
#5
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
01-15-2010, 02:26 AM
|
#6
|
Member
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657
Original Poster
Rep:
|
Quote:
Originally Posted by jschiwal
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.
|
|
|
01-17-2010, 09:36 AM
|
#7
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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.
|
|
|
All times are GMT -5. The time now is 01:05 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|