Bug 1319041

Summary: updatedb does not like nested mounts ( of a different FS type).
Product: Red Hat Enterprise Linux 6 Reporter: Vincent S. Cojot <vcojot>
Component: mlocateAssignee: Michal Sekletar <msekleta>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-06 11:31:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Vincent S. Cojot 2016-03-18 14:10:39 UTC
Description of problem:

On one machine with nested mounts (SELinux permissive), updatedb never explores the top mounted filesystem unless specifically requested to.

In more detail:
- RHEL6.7, with all of the latest updates as of today (20160318).
- /export/home mounted as ext4.
- /export/home/shared mounted as vxfs and not excluded/pruned.

1) # locate /export/home/shared returns only the directory, not the content.
2) # updatedb -U /export/home/shared makes locate display the right things.
3) # updatedb -U /export/home makes locate skip the content underneath /export/home/shared (like #1)

Problem exhibits itself with:
[root@daltigoth ~]# updatedb -U /export/home/shared
[root@daltigoth ~]# locate /|grep export/home/shared|wc -l
578795

[root@daltigoth ~]# updatedb -U /export/home       
[root@daltigoth ~]# locate /|grep export/home/shared|wc -l
1
(should return 578795)

[root@daltigoth ~]# updatedb -U /           
[root@daltigoth ~]# locate /|grep export/home/shared|wc -l
1
(should return 578795)

[root@daltigoth ~]# grep vxfs /etc/updatedb.conf 
[root@daltigoth ~]# grep /shared /etc/updatedb.conf
PRUNEPATHS = "/afs /media /net /sfs /tmp /udev /var/cache/ccache /var/spool/cups /var/spool/squid /var/tmp /shared/movies1"


Version-Release number of selected component (if applicable):
[root@daltigoth ~]# rpm -q mlocate 
mlocate-0.22.2-6.el6.x86_64

[root@daltigoth ~]# df -h /export/home 
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/rootdg-lv_home
                      457G  336G   99G  78% /export/home

[root@daltigoth ~]# df -h /export/home/shared 
Filesystem            Size  Used Avail Use% Mounted on
/dev/vx/dsk/local01dg/staging1_lv
                      1.2T  1.1T   76G  94% /export/home/shared

[root@daltigoth ~]# mount -v|grep /export/home
/dev/mapper/rootdg-lv_home on /export/home type ext4 (rw,noatime)
/dev/vx/dsk/local01dg/staging1_lv on /export/home/shared type vxfs (rw,delaylog,largefiles,noatime,ioerror=mwdisable)
/export/home on /net/imladris/export/home type none (rw,bind)
/export/home/shared on /net/imladris/export/home/shared type none (rw,bind)


How reproducible:

100%
updatedb -U /export/home/shared
vs:
updatedb -U /export/home

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Jan Kurik 2017-12-06 11:31:56 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/