Results 1 to 6 of 6

Thread: _netdev fstab option being ignored

  1. #1
    Join Date
    Nov 2006
    Beans
    Hidden!

    Unhappy _netdev fstab option being ignored

    Hi all,

    I had Debian installed before and the same fstab line worked, so I assume this is an Ubuntu specific issue:

    Code:
    javiribera@server:/home/javiribera/server /home/javiribera/server fuse.sshfs 
    rw,auto,user,noexec,umask=007,uid=1000,gid=1000,allow_other,follow_symlinks,_netdev 0 0
    I just mount a remote ssh folder using sshfs package into /home/javiribera/server.

    As far as I'm concerned, _netdev option means that The filesystem resides on a device that requires network access (used to prevent the system from attempting to mount these filesystems until the network has been enabled on the system).

    At boot, the folder is not mounted, and I think it is _netdev option's fault because when I type sudo mount -a it does mount properly.

    Any idea?

  2. #2
    Join Date
    Dec 2009
    Beans
    5,375

    Re: _netdev fstab option being ignored

    I have used it with a samba share and it worked just as you described it --- until one Ubuntu release where it stopped working .

    Not sure what happened but at the time I gave in and created a file at: /etc/network/if-up.d/fstab

    With this content:
    Code:
    #!/bin/sh
    mount -a
    And made it executable.

    Any script you place in if-up.d will only be run after the network is up. It's just automating the workaround you are doing manually.

  3. #3
    Join Date
    Nov 2006
    Beans
    Hidden!

    Re: _netdev fstab option being ignored

    mm good to know. I wonder whether it is a bug or why someone decided to remove this feature (_netdev option)

    Thanks

  4. #4
    Join Date
    Dec 2006
    Location
    Earth, USA, PA
    Beans
    144
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: _netdev fstab option being ignored

    Quote Originally Posted by Morbius1 View Post
    I have used it with a samba share and it worked just as you described it --- until one Ubuntu release where it stopped working .

    Not sure what happened but at the time I gave in and created a file at: /etc/network/if-up.d/fstab

    With this content:
    Code:
    #!/bin/sh
    mount -a
    And made it executable.

    Any script you place in if-up.d will only be run after the network is up. It's just automating the workaround you are doing manually.
    A little help on this, please.... I recently ran into this issue on an 12.04.2 server. FSTAB is set to mount 2 NFS shares and it used to work fine. A few updates and a reboot changed all that. I've since created /etc/network/if-up.d/fstab/mount.sh, set it so that the owner (root) can execute it (-rwxr--r-- 1 root root 19 May 15 09:45 mount.sh). The file has your exact code in it but it didn't seem to work. What step did I miss?
    Remember, amatures built the Ark; professionals built the Titanic.

  5. #5
    Join Date
    Dec 2009
    Beans
    5,375

    Re: _netdev fstab option being ignored

    Take a look at the contents of /etc/network/if-up.d

    They are all single files with no extensions and no subdirectories. You don't want:
    /etc/network/if-up.d/fstab/mount.sh

    You want:
    /etc/network/if-up.d/fstab


    Where fstab is the file containing the script not a directory.

  6. #6
    Join Date
    Dec 2006
    Location
    Earth, USA, PA
    Beans
    144
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Thumbs up Re: _netdev fstab option being ignored

    Quote Originally Posted by Morbius1 View Post
    Take a look at the contents of /etc/network/if-up.d

    They are all single files with no extensions and no subdirectories. You don't want:
    /etc/network/if-up.d/fstab/mount.sh

    You want:
    /etc/network/if-up.d/fstab


    Where fstab is the file containing the script not a directory.
    Ahhhhhhhhh, I see. Okay, I've made the change and set the permissions to mimic the others in that directory. I'll see how this works on my next reboot during our maintenance window. Thanks for the clarification.
    Remember, amatures built the Ark; professionals built the Titanic.

Tags for this Thread

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
  •