Re: mount nofail: what failures should we allow ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 19, 2016 at 06:24:58PM -0500, Mike Frysinger wrote:
> i've received two requests for the "nofail" option.  the doc for the
> option is a bit ... terse ... so it's hard to guess at the overall
> intention.

man mount:
   nofail Do not report errors for this device if it does not exist.


from my point of view this description is pretty explicit :-)

> (1) ignore ENOMEDIUM like:
> sys-utils/mount.c could be updated to do:
>     case ENOMEDIUM:
>         if (uflags & MNT_MS_NOFAIL)
>             return MOUNT_EX_SUCCESS;
>         warnx(_("no medium found on %s"), src);
>         break;
> this is for cases like cd/dvd drives which happens to have no disk loaded.

It seems like a good idea, send patch :-)

> (2) ignore unknown fs types.  e.g. when a kernel config/module is missing
> support for the requested filesystem type.  so a fstab entry like:
> 	..src..  /mnt/foo  somefs defaults,nofail
> rather than error out with:
> 	mount: unknown filesystem type 'somefs'
> it would just issue a warning like it does for other nofail options.

I'm not sure with this. It's unusual situation when any filesystem is unknown
for libblkid, but it's pretty common that kernel returns EINVAL. This
happen when a kernel config/module is missing, but also if you specify
wrong mount options and in some another situations. I don't think we
want to hide such problems. It's too generic...

    Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux