LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 06-19-2009, 01:11 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
/etc/mtab not up-to-date compared to /proc/mounts


Hello all.


I've noticed that "mount" and "cat /etc/mtab" doens't always report the same as "cat /proc/mounts":
Code:
[root@server1 mnt]# cat /proc/mounts |grep -i scan 
[root@server1 mnt]# cat /etc/mtab |grep -i scan 
//windows/share1$ /mnt/mount1 cifs rw,mand 0 0 
[root@server1 mnt]# mount |grep -i scan 
//windows/share1 on /mnt/mount1 type cifs (rw,mand)
It seems like mtab (and thus "mount") aren't always up-to-date. Is this a symptom of a more severe issue on my linux boxes?
 
Old 06-19-2009, 03:57 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Nope - "man mount"
 
Old 07-07-2009, 02:28 AM   #3
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Original Poster
Rep: Reputation: 40
Thanks.


I found this in the man page:
Quote:
It is possible that files /etc/mtab and /proc/mounts don't match. The first file is based only on the mount command options, but the content of the second file also depends on the kernel and others settings (e.g. remote NFS server. In particular case the mount command may reports unreliable information about a NFS mount point and the /proc/mounts file usually contains more reliable information.)
In my example the file /etc/mtab shows a samba share that is no longer mounted, while the /proc/mount correctly shows that it's not mounted. I'm not sure if the above excerpt from the man page covers my type of problem, since it first of all only mentions NFS, and second only says that the information may me "unreliable". Any thought?
 
  


Reply



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
filesystems in /proc/mounts are ro dindome Linux - Hardware 1 06-24-2008 04:51 AM
/etc/mtab vs. /proc/self/mounts ciotog Slackware 1 10-10-2005 04:31 AM
About /proc/mounts A-Liang Programming 3 11-27-2004 09:52 PM
/proc/mounts and /etc/mtab differs pradi_net Linux - Software 0 05-19-2004 09:47 AM
Can't find file '/proc/mounts' TY2K4 Red Hat 1 01-10-2004 07:39 AM

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

All times are GMT -5. The time now is 02:31 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