Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
DescriptionRoberto Bergantinos
2018-09-27 13:30:55 UTC
Description of problem:
Running mount -a several times causes mount attempts of CIFS shares subdir included in fstab even though they are already mounted :
[root@rhel74-2 tmp]# grep cifs /etc/fstab
//rhel73/myshare/mydir /mnt/mnt2 cifs credentials=/etc/fstab.d/cifs/myshare,uid=1000,gid=1000,dir_mode=0777,file_mode=0666 0 0
[root@rhel74-2 tmp]# grep cifs /proc/mounts
//rhel73/myshare/mydir /mnt/mnt2 cifs rw,relatime,vers=1.0,cache=strict,username=roberto,domain=RHEL73,uid=1000,forceuid,gid=1000,forcegid,addr=172.23.1.225,file_mode=0666,dir_mode=0777,nounix,serverino,mapposix,rsize=61440,wsize=65536,echo_interval=60,actimeo=1 0 0
[root@rhel74-2 tmp]# df -k -t cifs
Filesystem 1K-blocks Used Available Use% Mounted on
//rhel73/myshare/mydir 8374272 7982708 391564 96% /mnt/mnt2
[root@rhel74-2 tmp]# mount -vvv -a
/ : ignored
/boot : already mounted
swap : ignored
/mnt : already mounted
mount.cifs kernel mount options: ip=172.23.1.225,unc=\\rhel73\myshare,dir_mode=0777,file_mode=0666,uid=1000,gid=1000,user=roberto,prefixpath=mydir,pass=********
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@rhel74-2 tmp]# mount -vvv -a
/ : ignored
/boot : already mounted
swap : ignored
/mnt : already mounted
mount.cifs kernel mount options: ip=172.23.1.225,unc=\\rhel73\myshare,dir_mode=0777,file_mode=0666,uid=1000,gid=1000,user=roberto,prefixpath=mydir,pass=********
mount error(16): Device or resource busy
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
You may get EBUSY or a successful mount depending on CIFS client/server setup
(in this latter case, /proc/mounts gets duplicate entries each time mount -a
runs) but mount is always tried.
Enabling libmount debug, mnt_table_is_fs_mounted returns 0 :
...
12895: libmount: TAB: [0x557c440630d0]: mnt_table_is_fs_mounted: //rhel73/myshare/mydir2 [rc=0]
...
As opposed to mount whole share :
...
13035: libmount: TAB: [0x557a077df0d0]: mnt_table_is_fs_mounted: //rhel73/myshare [rc=1]
...
This is fixed in the following commit :
https://github.com/karelzak/util-linux/commit/76d4fba2e47808264f5c4c883127b0d275e31949
Indeed it cannot be reproduced on FC27 which contains the commit:
[root@idlethread /]# grep cifs /proc/mounts
//rhel73/myshare/mydir /mnt2 cifs rw,relatime,vers=default,cache=strict,username=roberto,domain=,uid=0,noforceuid,gid=0,noforcegid,addr=172.23.1.225,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1 0 0
[root@idlethread /]# df -k -t cifs
Filesystem 1K-blocks Used Available Use% Mounted on
//rhel73/myshare/mydir 8374272 7984600 389672 96% /mnt2
[root@idlethread /]# mount -vvv -a
/ : ignored
/boot : already mounted
/home : already mounted
swap : ignored
/ISOs : already mounted
/mnt2 : already mounted <<<== GOOD
but customer running RHEL7 request backport of this fix to RHEĹ7
Version-Release number of selected component (if applicable): RHEL7
How reproducible:
100 %
Steps to Reproduce:
1. add fstab entry to mount a subdir from a share
2. mount -a
3. mount -a
Actual results:
filesystem mount is tried despite being already mounted
Expected results:
skip that entry :
Additional info:
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2019:2252