Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: noauto ignored in fstab in 20.04?

  1. #1
    Join Date
    Jul 2020
    Beans
    2

    noauto ignored in fstab in 20.04?

    I have some entries with the "noauto" option in my my fstab. These are local disks, attached via esata. Since around 20.04 it appears that the noauto option is no longer being respected. Has anyone else seen this?

    I am pretty sure I didn't see this in the previous LTS release.

    Steve

    Example entry:

    #<file system> <mount point> <type> <options> <dump> <pass>
    UUID=4a90a13d-9eab-4fb0-a646-6cedee6be036 /disk/XXX ext4 defaults,relatime,noauto 0 1

  2. #2
    Join Date
    Oct 2004
    Location
    Albuquerque New Mexico, U
    Beans
    1,182
    Distro
    Ubuntu Development Release

    Re: noauto ignored in fstab in 20.04?

    I've got one in my fstab that works as expected. I put noauto as the first item in the option section, but I don't know if that makes a difference.
    regards

  3. #3
    Join Date
    Jul 2020
    Beans
    2

    Re: noauto ignored in fstab in 20.04?

    I figured this out in the end. It was because I was exporting the directory over NFS. As such it looks like systemd(?) figured out the dependency and forced the mount to happen. Removing the partition from /etc/exports stopped it from being mounted at boot time.

    Steve

  4. #4
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: noauto ignored in fstab in 20.04?

    So this is "Solved" now? It appears to me, in your last post, that it is.

    If so... Just saying... You could mark it as such, so others with a similar problem can find what helped you solve it.

    Concurrent coexistance of Windows, Linux and UNIX...
    Ubuntu user # 33563, Linux user # 533637
    Sticky: [all variants] Graphics Resolution- Upgrade /Blank Screen after reboot
    UbuntuForums system-info Script

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: noauto ignored in fstab in 20.04?

    If you'd like storage mounted as needed, on demand, use autofs.

    Somewhere around 16.04, systemd-mount took over control of the fstab processing. It broke a number of things, like the trick to force an fsck on a partition at the next boot by doing sudo touch /forcefsck. <--- that doesn't work any more and I haven't found any easy way to force an fsck at boot without console access. The possible solutions require modifying the grub boot options or using tune2fs to force an fsck much more often.

    I suspect the fstab issue is with having "defaults" listed, when you don't want all the defaults. The manpage says:
    Code:
                  defaults
                         use default options: rw, suid, dev, exec, auto, nouser, and async.
    So the line says auto, then no auto. Which is it?

  6. #6
    Join Date
    Sep 2011
    Location
    Behind you!
    Beans
    1,533
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: noauto ignored in fstab in 20.04?

    Quote Originally Posted by TheFu View Post
    I suspect the fstab issue is with having "defaults" listed, when you don't want all the defaults. The manpage says:
    Code:
                  defaults
                         use default options: rw, suid, dev, exec, auto, nouser, and async.
    So the line says auto, then no auto. Which is it?
    What do you mean? It just says auto and then nouser.

    LHammonds

  7. #7
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: noauto ignored in fstab in 20.04?

    defaults,relatime,noauto
    becomes
    rw,suid,dev,exec,auto,nouser,async,relatime,noauto
    after expansion. Those options conflict. The actual implementation should cleanly address it, but bugs like that are common.
    Last edited by TheFu; June 28th, 2021 at 04:49 PM.

  8. #8
    Join Date
    Sep 2011
    Location
    Behind you!
    Beans
    1,533
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: noauto ignored in fstab in 20.04?

    Ah gotcha. You were talking about the OP's usage...not the "defaults" by itself. But if the end-user has "defaults" in the line, they should really know what that contains and only use it "if" they need each of those settings. But I get wanting the system to correct such mistakes but that means it would need to cancel an option...and at least error log the situation. Is there no error log entry if auto and noauto is used on the same line?

    LHammonds

  9. #9
    Join Date
    Dec 2009
    Beans
    6,547

    Re: noauto ignored in fstab in 20.04?

    But ..... that's not how fstab is implemented. It is read from left to right so if "defaults" is used first and that means "auto" it is replaced with "noauto" ( and any other subsequent settings ) as it is read until the end of the fstab record.

    Order matters. If "defaults" appeared after "noauto" the situation is different. That's why you often see folks follow the "user" option with "exec" since "user" sets noexec.

    Anyhoo, "defaults" is basically only used when you have no other options since you can't leave an empty field in the fstab record. The default settings will always be applied first if "defaults" is there or not because .. well ... those are the defaults for that filesystem.

  10. #10
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: noauto ignored in fstab in 20.04?

    I see in the fstab manpage that LINES are interpreted from top to bottom.

    The mount(8) manpage says:
    Code:
    The usual behavior  is  that  the
           last option wins if there are conflicting ones.
    So the last option seen wins. Confirmed. I need to check all my mounts .... found 1 system where "defaults" came after an option. That system probably started around 2006 and has been upgraded since. Don't think the added option conflicted.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •