All of lore.kernel.org
 help / color / mirror / Atom feed
* mount: "nofail" option does not seem to work as expected
@ 2014-03-24 22:44 Patrick McLean
  2014-04-07 10:12 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McLean @ 2014-03-24 22:44 UTC (permalink / raw)
  To: util-linux

First the "nofail" doesn't actually prevent "failure" when using "mount
-a". If any filesystem fails to mount with mount -a due to the device
not existing, even if "nofail" is specified in the mount, mount will
exit with a status of 32. I would expect that "nofail" would imply that
such failures would cause the exit status to be 0.

Also, it seems that the "nofail" mount option does not work at all when
using the tag-style partition identifiers rather than udev symlinks.

Using this line in fstab:
UUID=nonexist /mnt/nonexist1 ext4 nofail 0 1

Will produce an error message:
# mount -av
mount: can't find UUID=nonexist
#

Where this line:
/dev/disk/by-uuid/nonexist /mnt/nonexist ext4 nofail 0 1

Does not produce any error:
# mount -av
#

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mount: "nofail" option does not seem to work as expected
  2014-03-24 22:44 mount: "nofail" option does not seem to work as expected Patrick McLean
@ 2014-04-07 10:12 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2014-04-07 10:12 UTC (permalink / raw)
  To: Patrick McLean; +Cc: util-linux

On Mon, Mar 24, 2014 at 03:44:26PM -0700, Patrick McLean wrote:
> First the "nofail" doesn't actually prevent "failure" when using "mount
> -a". If any filesystem fails to mount with mount -a due to the device
> not existing, even if "nofail" is specified in the mount, mount will
> exit with a status of 32. I would expect that "nofail" would imply that
> such failures would cause the exit status to be 0.
> 
> Also, it seems that the "nofail" mount option does not work at all when
> using the tag-style partition identifiers rather than udev symlinks.
> 
> Using this line in fstab:
> UUID=nonexist /mnt/nonexist1 ext4 nofail 0 1
> 
> Will produce an error message:
> # mount -av
> mount: can't find UUID=nonexist
> #
> 
> Where this line:
> /dev/disk/by-uuid/nonexist /mnt/nonexist ext4 nofail 0 1
> 
> Does not produce any error:
> # mount -av

 Excellent catch, thanks!

 Fixed and will be in v2.24.2.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-04-07 10:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-24 22:44 mount: "nofail" option does not seem to work as expected Patrick McLean
2014-04-07 10:12 ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.