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.
+++ This bug was initially created as a clone of Bug #1271848 +++
Description of problem:
Systems booted and was appearing to do an fsck but was failing because of the args past in via /etc/fstab
/ partition referenced in /etc/fstab looked like this (note the -e)
[root@seaking ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Fri Jan 7 15:10:37 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
-e/dev/mapper/rootvg-rootlv / ext4 defaults 1 1
UUID=1d960796-c08d-4a0d-926f-3cf3c193ebd2 /boot ext4 defaults 1 2
/dev/mapper/rootvg-tmplv /tmp ext4 defaults 1 2
/dev/mapper/rootvg-varlv /var ext4 defaults 1 2
/dev/mapper/rootvg-crashlv /var/crash ext4 defaults 1 2
/dev/mapper/rootvg-swaplv swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/md0 /data ext4 defaults,nodiratime,noatime,barrier=0 0 0
Notice how mount -a doesn't recognize an issue
[root@seaking ~]# mount -a
[root@seaking ~]#
Now if I add a space after -e an issue is recognized.
[root@seaking ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Fri Jan 7 15:10:37 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
-e /dev/mapper/rootvg-rootlv / ext4 defaults 1 1
UUID=1d960796-c08d-4a0d-926f-3cf3c193ebd2 /boot ext4 defaults 1 2
/dev/mapper/rootvg-tmplv /tmp ext4 defaults 1 2
/dev/mapper/rootvg-varlv /var ext4 defaults 1 2
/dev/mapper/rootvg-crashlv /var/crash ext4 defaults 1 2
/dev/mapper/rootvg-swaplv swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/md0 /data ext4 defaults,nodiratime,noatime,barrier=0 0 0
[root@seaking ~]# mount -a
[mntent]: line 9 in /etc/fstab is bad
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
mount -a
echo $? returns 0
Expected results:
mount -a should be able to catch the noted typo above
Additional info:
[root@seaking ~]# for fs in $(awk '!/^#/ {print $1}' /etc/fstab) ; do mount -fv ${fs} >/dev/null || echo ${fs} ; done
mount: invalid option -- 'e'
Usage: mount -V : print version
mount -h : print this help
mount : list mounted filesystems
mount -l : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
mount -a [-t|-O] ... : mount all stuff from /etc/fstab
mount device : mount device at the known place
mount directory : mount known device here
mount -t type dev dir : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
mount --bind olddir newdir
or move a subtree:
mount --move olddir newdir
One can change the type of mount containing the directory dir:
mount --make-shared dir
mount --make-slave dir
mount --make-private dir
mount --make-unbindable dir
One can change the type of all the mounts in a mount subtree
containing the directory dir:
mount --make-rshared dir
mount --make-rslave dir
mount --make-rprivate dir
mount --make-runbindable dir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using -L label or by uuid, using -U uuid .
Other options: [-nfFrsvw] [-o options] [-p passwdfd].
For many more details, say man 8 mount .
-e/dev/mapper/rootvg-rootlv
mount: according to mtab, /dev/sdb1 is already mounted on /boot
UUID=1d960796-c08d-4a0d-926f-3cf3c193ebd2
mount: according to mtab, /dev/mapper/rootvg-tmplv is already mounted on /tmp
/dev/mapper/rootvg-tmplv
mount: according to mtab, /dev/mapper/rootvg-varlv is already mounted on /var
/dev/mapper/rootvg-varlv
mount: according to mtab, /dev/mapper/rootvg-crashlv is already mounted on /var/crash
/dev/mapper/rootvg-crashlv
mount: according to mtab, /dev/mapper/rootvg-swaplv is already mounted on swap
/dev/mapper/rootvg-swaplv
mount: according to mtab, tmpfs is already mounted on /dev/shm
tmpfs
mount: according to mtab, devpts is already mounted on /dev/pts
devpts
mount: according to mtab, sysfs is already mounted on /sys
sysfs
mount: according to mtab, proc is already mounted on /proc
proc
mount: according to mtab, /dev/md0 is already mounted on /data
/dev/md0
Well, RHEL7 libmount based mount(8) behaves differently than the original mount(8) from RHEL6.
Unfortunately, it does not ignore malformed fstab lines, this bug affects mount, umount, findmnt, lsblk, swapon and swapof.
Note that RHEL7 does not use "mount -a" during boot (systemd handles this).
Fixed in upstream tree, commit 1cd9d0d7463850ef6b16a78b8a55e56dbf9a8db1
(and optionally also 1bb02a2da9f1bf7d80b352d540b29371099ab570).
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://rhn.redhat.com/errata/RHSA-2016-2605.html