Solved - Fstab does not auto mount network drive at boot

  • Hello,


    I am trying to mount a network share at boot and it is not working. I can mount it successfully with the command mount -a. I've pasted a copy of my fstab below. I'd appreciate any input.



    /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    # / was on /dev/sda2 during installation
    UUID=3a799dc3-9258-4638-9d88-4e6efbdce491 / ext4 errors=remount-ro 0 1
    # /boot/efi was on /dev/sda1 during installation
    UUID=6BB2-DD33 /boot/efi vfat defaults 0 1
    # swap was on /dev/sda3 during installation
    UUID=00a7f795-1869-48d7-9788-1d8cbc752b78 none swap sw 0 0
    /dev/sdc1 /media/usb0 auto rw,user,noauto 0 0
    /dev/sdc2 /media/usb1 auto rw,user,noauto 0 0
    tmpfs /tmp tmpfs defaults 0 0
    # >>> [openmediavault]
    UUID=693317cc-a5e3-4af9-8e94-2e855c927bd8 /media/693317cc-a5e3-4af9-8e94-2e855c927bd8 ext4 def$
    # <<< [openmediavault]
    //192.168.0.15/Multimedia /mnt/voodoo cifs uid=0,guid=0,rw,credentials=/etc/cifspasswd 0 0

    Motherboard: Gigabyte GA-H81M-HD3 Micro ATX LGA1150, Processor: Intel Core i5-4440 3.1GHz Quad-Core, Memory: G.Skill 4GB (2 x 2GB) DDR3-1333

    Einmal editiert, zuletzt von kjacques1 ()

  • Hi,


    you're trying to mount a network file system (cifs) and the network is is not (yet) up when the fstab is being processed. Add _netdev to the options in the fstab line and the if-up script mountnfs (don't let yourself fool by the name) will take care of mounting the filesystem.


    Should work, if I'm not completely mistaken.


    SlashOpt

    OMV 2.x - Kralizec // Hardware: HP Microserver N54L, 4GB RAM, 2x3TB WD Red - RAID 1, Sandisk SSD 60GB for system

    • Offizieller Beitrag

    There is a plugin called openmediavault-remoteshare that does this for you. It allows you to mount nfs, samba/cifs, and webdav. Just install omv-extras and it will show up in the plugin list.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Here is the syntax I did per your suggestion.


    //192.168.0.15/Multimedia /mnt/voodoo cifs auto,_netdev,uid=0,guid=0,rw,credentials=/etc/cifspasswd 0 0


    Is this correct? The network share did not auto mount after a reboot. :(

    Motherboard: Gigabyte GA-H81M-HD3 Micro ATX LGA1150, Processor: Intel Core i5-4440 3.1GHz Quad-Core, Memory: G.Skill 4GB (2 x 2GB) DDR3-1333

  • Try the plugin Aaron suggested.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

    • Offizieller Beitrag

    There was work done on the remoteshare plugin to fix this exact issue...

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Ok. I will try the plug-in when I get home tonight.


    Thanks.

    Motherboard: Gigabyte GA-H81M-HD3 Micro ATX LGA1150, Processor: Intel Core i5-4440 3.1GHz Quad-Core, Memory: G.Skill 4GB (2 x 2GB) DDR3-1333

  • Zitat von "kjacques1"

    Here is the syntax I did per your suggestion.


    //192.168.0.15/Multimedia /mnt/voodoo cifs auto,_netdev,uid=0,guid=0,rw,credentials=/etc/cifspasswd 0 0


    Is this correct? The network share did not auto mount after a reboot. :(


    Oops, thought that cifs filesystems are automatically mounted on reboot by the if-up script I mentioned. I tripped over this when I implemented the 'Webdav addition' for the remoteshare plugin ryecoaaron mentioned in his post.


    Sorry for the confusion!

    OMV 2.x - Kralizec // Hardware: HP Microserver N54L, 4GB RAM, 2x3TB WD Red - RAID 1, Sandisk SSD 60GB for system

  • Hmmm.


    Doesn't look like the plug-in is compatible with omv 1.0.7 kralizec. Any other ideas or do I need to downgrade?


    Thanks,

    Motherboard: Gigabyte GA-H81M-HD3 Micro ATX LGA1150, Processor: Intel Core i5-4440 3.1GHz Quad-Core, Memory: G.Skill 4GB (2 x 2GB) DDR3-1333

  • Bizarre. Now it is auto mounting at reboot.

    Motherboard: Gigabyte GA-H81M-HD3 Micro ATX LGA1150, Processor: Intel Core i5-4440 3.1GHz Quad-Core, Memory: G.Skill 4GB (2 x 2GB) DDR3-1333

    Einmal editiert, zuletzt von kjacques1 ()

    • Offizieller Beitrag

    Did you enable the testing repo in omv-extras? It definitely works on 1.0.7.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • OK. I've enabled it. There was no need for me to set it up though through the plug-in because now the nfs share is being mounted automatically. I'm not sure what has changed though. Maybe upgrading to 1.0.7 did the trick?


    Thanks.

    Motherboard: Gigabyte GA-H81M-HD3 Micro ATX LGA1150, Processor: Intel Core i5-4440 3.1GHz Quad-Core, Memory: G.Skill 4GB (2 x 2GB) DDR3-1333

    • Offizieller Beitrag

    Upgrading to 1.0.7 shouldn't have fixed it because you are doing everything outside of OMV. I still recommend using the plugin.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Hello,


    I've moved to using the plugin and successfully mounted the network share under the samba tab which shows enabled. However on a reboot the share is not auto-mounting? If I run a mount -a after login though it mounts Is there a preference I missed to tell it to mount on a reboot?


    Thanks.

    Motherboard: Gigabyte GA-H81M-HD3 Micro ATX LGA1150, Processor: Intel Core i5-4440 3.1GHz Quad-Core, Memory: G.Skill 4GB (2 x 2GB) DDR3-1333

    • Offizieller Beitrag

    Is your set to use DHCP?

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Both OMV and the Network share have static i.p.'s


    Thanks.

    Motherboard: Gigabyte GA-H81M-HD3 Micro ATX LGA1150, Processor: Intel Core i5-4440 3.1GHz Quad-Core, Memory: G.Skill 4GB (2 x 2GB) DDR3-1333

  • Here is what the plug-in wrote in to the fstab if that helps. I have x'd out the user and pass.


    //192.168.0.15/Multimedia /media/08296903-afd0-4d34-894a-ed233d5599c3/voodoo/ cifs username=XXXXX,password=XXXXXX,sec=ntlm,iocharset=utf8 0 0


    Thanks.

    Motherboard: Gigabyte GA-H81M-HD3 Micro ATX LGA1150, Processor: Intel Core i5-4440 3.1GHz Quad-Core, Memory: G.Skill 4GB (2 x 2GB) DDR3-1333

    • Offizieller Beitrag

    All I can think is that it is a timing thing. The network isn't quite ready when it is trying to mount entries in fstab.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Try the latest update - version 1.0 in the kralizec repo.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Can this be updated through the plug-in manager?

    Motherboard: Gigabyte GA-H81M-HD3 Micro ATX LGA1150, Processor: Intel Core i5-4440 3.1GHz Quad-Core, Memory: G.Skill 4GB (2 x 2GB) DDR3-1333

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!