Bug 14498 - Why is mount -a is not detecting an already mounted DFS share endpoint
Summary: Why is mount -a is not detecting an already mounted DFS share endpoint
Status: NEW
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: user space tools (show other bugs)
Version: 3.x
Hardware: x64 Linux
: P5 normal
Target Milestone: ---
Assignee: Jeff Layton
QA Contact: cifs QA contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-16 17:45 UTC by Chris Pickett
Modified: 2022-07-25 23:02 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Pickett 2020-09-16 17:45:15 UTC
I am trying to figure out why mount -a is not detecting an already mounted DFS share endpoint. It works as expected on mount.cifs version 5.5 but not 6.7

Distributor ID: Debian
Description:    Debian GNU/Linux 9.13 (stretch)
Release:        9.13
Codename:       stretch

Mount.cifs version 6.7. 

/etc/fstab 
//ctserver6/ops_apps    /mnt/ops_apps cifs   defaults,credentials=/root/.smbcredentials,rw,users,_netdev,soft   0 0 
//ctserverbc/Public     /mnt/ctserverbc cifs    defaults,credentials=/root/.smbcredentials,rw,users,_netdev,soft 0 0 
#//ctserver3/ops         /mnt/ops cifs              defaults,credentials=/root/.smbcredentials,rw,users,_netdev,soft   0 0 
#//ctserver3/public      /mnt/public cifs         defaults,credentials=/root/.smbcredentials,rw,users,_netdev,soft 0 0 
//ctdomain.local/DFS_OPS/OPS       /mnt/ops cifs        vers=2.1,credentials=/root/.smbcredentials,rw,users,_netdev,soft   0 0 
//ctdomain.local/DFS_OPS/Public    /mnt/public cifs    vers=2.1,credentials=/root/.smbcredentials,rw,users,_netdev,soft   0 0 
 
If I leave off the vers=2.1 option it will create a new mount process and duplicate in /proc/mounts :
/mnt/ops_apps            : already mounted
/mnt/ctserverbc          : already mounted
mount.cifs kernel mount options: ip=192.168.111.10,unc=\\ctdomain.local\DFS_OPS,soft,user=ctlinux,prefixpath=OPS,pass=********
/mnt/ops                 : successfully mounted
mount.cifs kernel mount options: ip=192.168.111.20,unc=\\ctdomain.local\DFS_OPS,soft,user=ctlinux,prefixpath=Public,pass=********
/mnt/public              : successfully mounted

With vers=2.1 I get:

/mnt/ops_apps            : already mounted 
/mnt/ctserverbc          : already mounted 
mount.cifs kernel mount options:
ip=192.168.111.20,unc=\\ctdomain.local\DFS_OPS,vers=2.1,soft,user=ctlinux,prefixpath=OPS,pass=******** 
mount error(16): Device or resource busy Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 
mount.cifs kernel mount options:
ip=192.168.111.20,unc=\\ctdomain.local\DFS_OPS,vers=2.1,soft,user=ctlinux,prefixpath=Public,pass=******** 
mount error(16): Device or resource busy Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) 

On 5.5 it will detect the DFS share is mounted already

-- 


Chris Pickett |
Linux Systems Engineer
Comment 1 Chris Pickett 2020-09-16 17:48:30 UTC
The result is duplicate mount processes created for every mount -a attempted. We had a cron that was calling mount -a every 5 min so we were building up quite a few entries in /proc/mounts.
Comment 2 Steve French 2020-09-18 04:08:41 UTC
What is the kernel version on the two (the failing and working kernels)?
Comment 3 Chris Pickett 2020-09-21 15:00:52 UTC
The kernel version is the same on both systems. They are LCX containers running on Proxmox kernel version 4.15.18-30-pve. However, they are on separate hypervisors.