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.
Description of problem:
mount -av" report NFS "successfully mounted" in RHEL 7.2 with util-linux-2.23.2-26.el7_2.2.x86_64 but it is not.
Version-Release number of selected component (if applicable):
RHEL 7.2 3.10.0-327.13.1.el7.x86_64
util-linux-2.23.2-26.el7_2.2.x86_64
Steps to Reproduce:
[root@dhcp233-147 ~]# cat /etc/exports
/iptvstage *(rw,sync)
[root@dhcp8-30 ~]# grep -i iptvstage /etc/fstab
10.65.2.185:/iptvstage /iptvstage nfs defaults,intr,_netdev 0 0
[root@dhcp8-30 ~]# mount -a
mount.nfs: mount point /iptvstage does not exist <--------
[root@dhcp8-30 ~]# mount -av
/ : ignored
/boot : already mounted
swap : ignored
mount.nfs: mount point /iptvstage does not exist
/iptvstage : successfully mounted <----------shows as mounted
man page of mount:
-v, --verbose
Verbose mode.
-a, --all
Mount all filesystems (of the given types) mentioned in fstab.
But if you see df-h, /proc/mounts output it doesnt get mounted.
[root@dhcp8-30 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel_dhcp8--30-root 4.0G 1.4G 2.6G 35% /
devtmpfs 486M 0 486M 0% /dev
tmpfs 496M 0 496M 0% /dev/shm
tmpfs 496M 57M 440M 12% /run
tmpfs 496M 0 496M 0% /sys/fs/cgroup
/dev/vda1 497M 125M 373M 26% /boot
tmpfs 100M 0 100M 0% /run/user/0
[root@dhcp8-30 ~]# grep -i iptvstage /proc/mounts
[root@dhcp8-30 ~]# ls /iptvstage
ls: cannot access /iptvstage: No such file or directory
Actual results: mount -av showing as mounted which is incorrect.
[root@dhcp8-30 ~]# mount -av
/ : ignored
/boot : already mounted
swap : ignored
mount.nfs: mount point /iptvstage does not exist
/iptvstage : successfully mounted
Expected results:
mount -av
/ : ignored
/boot : already mounted
swap : ignored
mount.nfs: mount point /iptvstage does not exist
Additional info:
The "successfully mounted" message came from the following code:
util-linux-2.23.2/sys-utils/mount.c
173 static int mount_all(struct libmnt_context *cxt)
174 {
...
199 } else {
200 mk_exit_code(cxt, mntrc); /* to print warning s */
201
202 if (mnt_context_get_status(cxt)) {
203 nsucc++;
204
205 if (mnt_context_is_verbose(cxt))
206 printf("%-25s: successfully mounted
", tgt);
207 } else
208 nerrs++;
209 }
...
This is because mnt_context_get_status(cxt) is constantly true for NFS mounts. Its code:
util-linux-2.23.2/libmount/src/context.c
1982 int mnt_context_get_status(struct libmnt_context *cxt)
1983 {
1984 assert(cxt);
1985 return !cxt->syscall_status || !cxt->helper_exec_status;
1986 }
Yes, the current upstream code also cares about mk_exit_code() result (where we check status of the helper). Upstream commit 8ab82185eed76bc20694a197fe10c5f9fb795b80.
Note that I don't think that the incorrect verbose message is a urgent issue.
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-2017:2186
Description of problem: mount -av" report NFS "successfully mounted" in RHEL 7.2 with util-linux-2.23.2-26.el7_2.2.x86_64 but it is not. Version-Release number of selected component (if applicable): RHEL 7.2 3.10.0-327.13.1.el7.x86_64 util-linux-2.23.2-26.el7_2.2.x86_64 Steps to Reproduce: [root@dhcp233-147 ~]# cat /etc/exports /iptvstage *(rw,sync) [root@dhcp8-30 ~]# grep -i iptvstage /etc/fstab 10.65.2.185:/iptvstage /iptvstage nfs defaults,intr,_netdev 0 0 [root@dhcp8-30 ~]# mount -a mount.nfs: mount point /iptvstage does not exist <-------- [root@dhcp8-30 ~]# mount -av / : ignored /boot : already mounted swap : ignored mount.nfs: mount point /iptvstage does not exist /iptvstage : successfully mounted <----------shows as mounted man page of mount: -v, --verbose Verbose mode. -a, --all Mount all filesystems (of the given types) mentioned in fstab. But if you see df-h, /proc/mounts output it doesnt get mounted. [root@dhcp8-30 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel_dhcp8--30-root 4.0G 1.4G 2.6G 35% / devtmpfs 486M 0 486M 0% /dev tmpfs 496M 0 496M 0% /dev/shm tmpfs 496M 57M 440M 12% /run tmpfs 496M 0 496M 0% /sys/fs/cgroup /dev/vda1 497M 125M 373M 26% /boot tmpfs 100M 0 100M 0% /run/user/0 [root@dhcp8-30 ~]# grep -i iptvstage /proc/mounts [root@dhcp8-30 ~]# ls /iptvstage ls: cannot access /iptvstage: No such file or directory Actual results: mount -av showing as mounted which is incorrect. [root@dhcp8-30 ~]# mount -av / : ignored /boot : already mounted swap : ignored mount.nfs: mount point /iptvstage does not exist /iptvstage : successfully mounted Expected results: mount -av / : ignored /boot : already mounted swap : ignored mount.nfs: mount point /iptvstage does not exist Additional info: The "successfully mounted" message came from the following code: util-linux-2.23.2/sys-utils/mount.c 173 static int mount_all(struct libmnt_context *cxt) 174 { ... 199 } else { 200 mk_exit_code(cxt, mntrc); /* to print warning s */ 201 202 if (mnt_context_get_status(cxt)) { 203 nsucc++; 204 205 if (mnt_context_is_verbose(cxt)) 206 printf("%-25s: successfully mounted ", tgt); 207 } else 208 nerrs++; 209 } ... This is because mnt_context_get_status(cxt) is constantly true for NFS mounts. Its code: util-linux-2.23.2/libmount/src/context.c 1982 int mnt_context_get_status(struct libmnt_context *cxt) 1983 { 1984 assert(cxt); 1985 return !cxt->syscall_status || !cxt->helper_exec_status; 1986 }