mount.cifs incorrectly update /etc/mtab when -o remount is used
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cifs-utils (Ubuntu) |
Fix Released
|
Undecided
|
Louis Bouchard | ||
Precise |
Fix Released
|
Medium
|
Louis Bouchard | ||
Quantal |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
SRU justification :
During a remount of a cifs filesystem, the mtab file is not properly
updated, which leads to a doubled entry of the same filesystem in the
/etc/mtab file.
Impact :
df and other tools incorrectly report the CIFS file system as mounted twice
Fix :
This has been fixed upstream in version 5.3 which is present in Quantal and more recent releases. The following upstream commit provides the fix :
Test Case :
- An accessible SAMBA share is required on host 'sambahost'
- the user=,password= options are only required to avoid password prompt
$ mkdir /mnt/target
$ mount -o user=,password= //sambahost/test /mnt/target
$ mount -o remount /mnt/target
$ df | grep target
//sambahost/test 7033648 1278124 5402656 20% /mnt/target
//sambahost/test 7033648 1278124 5402656 20% /mnt/target
With the proposed fix, there would be only one /mnt/target entry
Regression :
This fix is already present in Q & R. It only introduce a del_mtab function that is only called when MS_REMOUNT is set on the file system.
Original description of the problem :
Create a file with the following contents, making sure that the samba location is available and is mountable by guests and that the mountpoint also exists and is a directory:
# cat /etc/puppet/
package{
mount{'home directory mount':
name => '/mnt/target',
atboot => 'true',
device => '//localhost/test',
ensure => 'mounted',
fstype => 'cifs',
require => [Package[
}
4.2- Apply the puppet config:
# puppet apply /etc/puppet/
4.3- Verify that the mounted FS shows twice:
root@ubuntu:~# mount -t cifs
//localhost/test on /mnt/target type cifs (rw)
//localhost/test on /mnt/target type cifs (rw)
Related branches
Changed in puppet (Ubuntu): | |
status: | Confirmed → In Progress |
Changed in cifs-utils (Ubuntu): | |
status: | In Progress → Fix Released |
Changed in cifs-utils (Ubuntu Quantal): | |
status: | New → Fix Released |
Changed in cifs-utils (Ubuntu Precise): | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Louis Bouchard (louis-bouchard) |
Upstream bug : http:// projects. puppetlabs. com/issues/ 10544