Bug 1271848
Summary: | mount -a doesn't catch a typo in /etc/fstab and a typo in /etc/fstab can make a system not reboot properly | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Dave Sullivan <dsulliva> | |
Component: | util-linux-ng | Assignee: | Karel Zak <kzak> | |
Status: | CLOSED NEXTRELEASE | QA Contact: | qe-baseos-daemons | |
Severity: | medium | Docs Contact: | ||
Priority: | medium | |||
Version: | 6.8 | CC: | dsulliva | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1271850 (view as bug list) | Environment: | ||
Last Closed: | 2017-04-25 12:05:19 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1269194, 1271850 |
Description
Dave Sullivan
2015-10-14 21:19:50 UTC
(In reply to Dave Sullivan from comment #0) > [root@seaking ~]# mount -a > [mntent]: line 9 in /etc/fstab is bad ... > Expected results: > mount -a should be able to catch the noted typo above What do you mean with "catch"? It reports the malformed line and the line is ignored. What else do you expect? Maybe the return code should be 64 ("some mounted") rather than zero. The basic "mount -a" feature is to be optimistic and continue working if possible. It's unwanted to stop when something is wrong with fstab ( Note that in RHEL7 we use systemd instead of "mount -a" and systemd is more pedantic and many users hate it. The first example with -e/dev/mapper/rootvg-rootlv / ext4 defaults 1 1 It doesn't catch the malformed line and returns 0. I think it's fine to have it continue just think with above example knowing that fsck will bail on the -e this should be addressed and especially if customers were thinking a mount -a test before reboot would catch any fstab problems. Wasn't really sure how on boot fstab is addressed relative to mount -a. Just know we were past grub which had identified the root device, noticed the fs needed fsck and we got some bogus fsck fail error with -e due to the typo. So I know on rhel6 fsck was trying to fsck, and assume some like mount -a reads the whole thing after pivot_root. Note that (based on this BZ report) findmnt since v2.29 supports --verify to check fstab parsability and usability. It's available for Fedora 25. For more details see http://karelzak.blogspot.cz/2016/10/util-linux-v229-whats-new.html CLOSING; for RHEL8 we will be available "findmnt --verify"; for RHEL6 it seems overkill to backport this feature or try to improve the fstab parser. |