"mount -a" mounts cifs shares multiple times

Bug #1768778 reported by Peet Whittaker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cifs-utils (Ubuntu)
New
Undecided
Unassigned

Bug Description

This is pretty much a duplicate of this report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589218

Output of 'grep "cifs" /etc/fstab':

//network/path /mnt/backups cifs dom=xyz,username=xyz,password=xyz,iocharset=utf8,sec=ntlm,vers=3.0 0 0

If I run 'mount -a' and then 'grep "cifs" /etc/mtab' I see 1 entry:

//network/path /mnt/backups cifs rw,relatime,vers=3.0,sec=ntlmssp,cache=strict,username=xyz,domain=xyz,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.238,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1 0 0

However, if I then re-run 'mount -a' and 'grep "cifs" /etc/mtab' I then see 2 (duplicated) entries:

//network/path /mnt/backups cifs rw,relatime,vers=3.0,sec=ntlmssp,cache=strict,username=xyz,domain=xyz,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.238,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1 0 0
//network/path /mnt/backups cifs rw,relatime,vers=3.0,sec=ntlmssp,cache=strict,username=xyz,domain=xyz,uid=0,noforceuid,gid=0,noforcegid,addr=10.0.0.238,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1 0 0

Running 'mount -a' further times just adds additional duplicate entries into etc/mtab.

This means that in order to un-mount the folder, I have to run 'umount /mnt/backups' multiple times (as many times as it is duplicated in /etc/mtab to be precise).

Adding a trailing slash to the remote network path (i.e. //network/path/) as suggested in the linked bug report makes no difference (I still get duplicated entries in /etc/mtab).

-- SYSTEM INFO --

Description: Ubuntu 16.04.4 LTS
Release: 16.04

Linux 4.4.0-122-generic #146-Ubuntu SMP Mon Apr 23 15:34:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

cifs-utils:
  Installed: 2:6.4-1ubuntu1.1
  Candidate: 2:6.4-1ubuntu1.1
  Version table:
 *** 2:6.4-1ubuntu1.1 500
        500 http://gb.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2:6.4-1ubuntu1 500
        500 http://gb.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.