FS#29241 - Mounting local filesystems gives [FAIL] although all is well

Attached to Project: Arch Linux
Opened by cfr (cfr42) - Monday, 02 April 2012, 21:03 GMT
Last edited by Tom Gundersen (tomegun) - Wednesday, 04 April 2012, 16:13 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Relevant forum thread: https://bbs.archlinux.org/viewtopic.php?id=136653 (includes irrelevant stuff as well)

Description:

Every time I boot, I get a "[FAIL]" report for mounting local filesystems although nothing fails to mount which is supposed to.

fstab does contain entries for a USB external drive but the partitions on this drive all have the "nofail" option listed.

boot log shows that the system looks for something in the position which I think would be taken by an sd card if I had one. Since I don't, the reader is empty and it does seem unhappy about this.

Additional info:
* package version(s)

core/util-linux 2.21-6 (base) [installed]
multilib/lib32-util-linux 2.21-1 [installed]

* config and/or log files etc.

fstab and /var/log/boot are attached (identifying info hopefully removed)


Steps to reproduce:
   fstab (2.2 KiB)
   boot (476.8 KiB)
This task depends upon

Closed by  Tom Gundersen (tomegun)
Wednesday, 04 April 2012, 16:13 GMT
Reason for closing:  Not a bug
Additional comments about closing:  mount works as advertised, and "nofail" does not apply to missing mountpoints.
Comment by cfr (cfr42) - Monday, 02 April 2012, 21:12 GMT
Could somebody delete the previous fstab? I can't figure out how to.
   fstab (2.2 KiB)
Comment by Dave Reisner (falconindy) - Monday, 02 April 2012, 21:17 GMT
Could you please post a reasonable fstab with UUIDs, comments separately, and the output of blkid to corroborate? Your config is useless without providing the whole story.
Comment by Tom Gundersen (tomegun) - Monday, 02 April 2012, 21:54 GMT
Thanks for the report. In addition to the info asked for by Dave, it would be very useful if you could try reproducing the problem with "testing/util-linux-2.21.1". If it still persists, the following would be useful:

Try booting with a minimal fstab, e.g.:

UUID=<UUID> / ext4 errors=remount-ro,noatime 0 1
UUID=<UUID> /var ext4 defaults,noatime 0 2

Check if the problem persists, if not, then try to find the minimal fstab where the problem occurs. Furthermore, it might be useful to try to mount the offending fs with only "defaults", and if that does not trigger the problem figure out what options do.
Comment by cfr (cfr42) - Monday, 02 April 2012, 22:52 GMT
I only started doing that because other people seemed to - I assumed there was some sort of security or privacy issue in including UUIDs (though I couldn't think what). Is there? Similarly for the HDA numbers.

Can I remove the existing files if they are useless?
Comment by cfr (cfr42) - Monday, 02 April 2012, 22:59 GMT
Do I need /home/* to boot? Or not to boot, but will it cause issues if I try to boot without mounting /home?
Comment by Tom Gundersen (tomegun) - Monday, 02 April 2012, 23:22 GMT
@cfr: I can't imagine the UUIDs are a privacy concern, but if you think they might be, just replace them by numbers or something like that. The important thing is that we are able to cross-reference your fstab with your blkid output (so you'd have to make the same substitution there).

You should be able to boot just fine without /home, it just means you won't get a graphical login, and you might not be able to login as anything other than root. For testing this is fine though.
Comment by cfr (cfr42) - Monday, 02 April 2012, 23:34 GMT
If I eliminate all entries for the external drive, I don't get the error.

If I add back in the root partition on the external drive, still no error.

If I add any further entries back, I get the error. I didn't actually test every possibility but I think I tested enough.

Basically, if the mount point does not exist, I get the error.
Comment by Tom Gundersen (tomegun) - Monday, 02 April 2012, 23:43 GMT
@cfr: awesome, thanks!

I can reproduce with:

# mount none -t tmpfs /non-existing-mount-point -o nofail
mount: mount point /non-existing-mount-point does not exist
# echo $?
32
Comment by Jan de Groot (JGC) - Tuesday, 03 April 2012, 10:11 GMT
If the mountpoint doesn't exist, that will give you a failure. The nofail option is documented in the manpage as "don't fail if the device is not present".
Comment by cfr (cfr42) - Wednesday, 04 April 2012, 03:02 GMT
But then it will always fail if an external drive is a system backup, for example, because mount points beneath / will be missing.

e.g. on my backup /boot/efi, /home, /var etc. are mount points so fstab contains /mnt/external-disk/boot/efi and so on. But if the external disk is absent, although /mnt/external-disk exists, nothing beneath it will.

By the way, do you still want fstab etc.? I figured it was less interesting now, but I'm happy to post it if you'd like. (Now I can stop worrying about obfuscating the UUIDs, it will be a lot less hassle!)
Comment by Dave Reisner (falconindy) - Wednesday, 04 April 2012, 03:04 GMT
You're misusing /etc/fstab. I don't think there's anything to fix here.
Comment by cfr (cfr42) - Wednesday, 04 April 2012, 13:23 GMT
So if that is a misuse of fstab, what is the correct way to set things up so that the options etc. are found automatically for the various partitions on the external drive? Or is there just no way to do that? (It seems a bit odd if there's not since it is possible to specify them for partitions which don't exist and I can't believe this type of set up, with an external drive for system backup, is that unusual.)
Comment by Dave Reisner (falconindy) - Wednesday, 04 April 2012, 13:29 GMT
The point of /etc/fstab isn't to specify mount options for random partitions -- it's to describe _static_ devices and their mountpoints/options. If these devices aren't always present, you need to find some other way to deal with them.
Comment by cfr (cfr42) - Wednesday, 04 April 2012, 13:49 GMT
So is the wiki just wrong on this (https://wiki.archlinux.org/index.php/Fstab#External_devices)? That's why I set things up this way - and I think the way some other people are probably using, too, since I'm not the only one seeing this problem.
Comment by Dave Reisner (falconindy) - Wednesday, 04 April 2012, 14:58 GMT
Wrong? I'd say it's misleading. As it's pointed out here, nofail only ignores errors for missing source devices. You have a bizzare setup that involves transient devices and nested mountpoints.
Comment by Tom Gundersen (tomegun) - Wednesday, 04 April 2012, 16:12 GMT
It seems that this setup is out of scope for util-linux/initscripts to deal with.

The best I can suggest is to mark your partitions as "noauto", and mount them manually on need when your device is plugged in (which I suppose is what you have had to do anyway most of the time if you plug in your backup device after switching your computer on).

Loading...