Re: Using /proc/mounts in mountlist.c for linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 05, 2011 at 03:18:02PM +0100, PÃdraig Brady wrote:
> On 05/04/11 13:36, Philipp Thomas wrote:
> > GNU find will not recognize file systems of type autofs on newer Linux
> > kernels as autofs entries are only listed in /proc/mounts and mountlist.c
> > includes glibc mntent.h which takes the _PATH_MOUNTED from paths.h and that
> > is /etc/mtab.
> > 
> > After a longer discussion, we (SUSE) chose to patch mountlist.c in findutils
> > to use proc/mounts instead of /etc/mtab which fixed ou problem.
> > 
> > Would gnulib accept the attached patch to mountlist.c?
> 
> Well locally I have symlinked /etc/mtab -> /proc/mounts since:
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f84e3f52
> So this would not break anything for me.
> 
> Also I understand Fedora 15 will symlink /etc/mtab to /proc/mount too.
> 
> What about older kernels though?

 If the find(1) command does not depend on mtab specific features
 (e.g. user= mount option) then my suggestion is to use /proc/mounts
 everywhere independently on the kernel version.
 
 I guess that mount options are completely irrelevant for find(1),
 right? So, /proc/mounts is the right choice.

> I'm wondering should suse be considering making the symlink also,
> or otherwise keeping /etc/mtab in sync?

 The mtab file is evil. The goal is to replace the file with the
 symlink in the near future. It's already supported (but not enabled
 by default) by mount(8) from util-linux v2.19. 
 
 We also need a special support for the symlink in mount.nfs and
 pam_mount. I hope all these issues will be resolved in the near
 future too.

 The symlinks is also already required by systemd, and if I good
 remember then people from almost all mainstream distributions
 collaborate on systemd development, so Fedora-15 is the first, but
 not last distro without mtab...

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux