Bug 136740 - mount does not resolve symlinks
mount does not resolve symlinks
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: util-linux (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Elliot Lee
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-21 20:32 EDT by Greg Marsden
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-10 16:47:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Greg Marsden 2004-10-21 20:32:57 EDT
We have found with autofs4 that if you umount an autofs partition, the
/etc/mtab entry is reduced to size 0 but not removed. As a result,
getmntent() in autofs reports that the partition is still mounted
and does not attempt to remount the partition.  This has been known
to happen without the umount, when /etc/mtab gets inconsistent.

Possible suggestion: have autofs read /proc/mounts instead of /etc/mtab?
Comment 2 Chris Feist 2004-11-03 16:47:42 EST
Can you provide the exact commands you're running to reproduce this
bug and the version of the autofs package that you have installed?
(rpm -q autofs).
Comment 3 Greg Marsden 2004-11-10 18:33:40 EST
[root@ap6004tst root]# rpm -qa | grep autofs 

autofs-4.1.3-12

Testcase:
[root@ap6004tst /]# df -k /slot01 

Filesystem           1K-blocks      Used Available Use% Mounted on

ap1022nap-vlan900:/vol/mfgtest1/slot01

                     372766960 354031776  18735184  95% /SLOTS/slot01



[root@ap6004tst /]# cat /etc/mtab | grep slot01 

ap1022nap-vlan900:/vol/mfgtest1/slot01 /SLOTS/slot01 nfs
rw,hard,nointr,nolock,rsize=16384,wsize=16384,tcp,nfsvers=3,timeo=600,tcp,hard,nointr,nolock,rsize=16384,wsize=16384,nfsvers=3,timeo=600,addr=144.20.233.18
0 0

[root@ap6004tst /]# cat /proc/mounts | grep slot01 

ap1022nap-vlan900:/vol/mfgtest1/slot01 /SLOTS/slot01 nfs
rw,v3,rsize=16384,wsize=16384,hard,tcp,nolock,addr=ap1022nap-vlan900 0 0



Both /etc/mtab and /proc/mounts have the entries



[root@ap6004tst /]# ls -l /slot01 

lrwxrwxrwx    1 root     root           13 Nov  9 20:18 /slot01 ->
/SLOTS/slot01

[root@ap6004tst /]# umount /slot01



--slot umounted 

[root@ap6004tst /]# cat /etc/mtab | grep slot01 

ap1022nap-vlan900:/vol/mfgtest1/slot01 /SLOTS/slot01 nfs
rw,hard,nointr,nolock,rsize=16384,wsize=16384,tcp,nfsvers=3,timeo=600,tcp,hard,nointr,nolock,rsize=16384,wsize=16384,nfsvers=3,timeo=600,addr=144.20.233.18
0 0

[root@ap6004tst /]# cat /proc/mounts | grep slot01 

[root@ap6004tst /]# cd /slot01

[root@ap6004tst slot01]# ls

[root@ap6004tst slot01]# df -k . 

Filesystem           1K-blocks      Used Available Use% Mounted on

ap1022nap-vlan900:/vol/mfgtest1/slot01

                             0         0         0   -  /SLOTS/slot01
Comment 4 Greg Marsden 2004-11-12 20:28:53 EST
OK this is a bug in util-linux not in autofs. Current version of
util-linux is 2.11y; changelog from 2.11z:
   * mount: change default: do resolve symlinks

This is exactly the behavior we are seeing here. Reproducible testcase:
mkdir bar
ln -s bar foo
mount /dev/device foo
umount bar

note that /etc/mtab is now inconsistent.
Comment 5 Elliot Lee 2004-12-10 16:47:44 EST
The bug is fixed in newer util-linux versions as far as we can tell.

Note You need to log in before you can comment on or make changes to this bug.