Automount cifs that gracefully handles a non responding server

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
2
down vote

favorite












There are lots of pages that show how to configure the system to automatically mount a network share accessed by CIFS (fstab, autofs, systemd.mount, probably even more). But they fail (at least my trials with the first two) when the server is not responding. With the update to Kubuntu 17.10 it even makes my system hang on boot with a black screen and syslog filled with:



CIFS VFS: cifs_mount failed w/return code = -113


And some:



CIFS VFS: cifs_mount failed w/return code = -111


So what is the recommended way to handle such a set up?



  • Mount a CIFS share at a given mount point (a KDE smb:// isn't enough)

  • Do everything automatically for every user

  • Take care that no problems occur when the target isn't available

  • When the target becomes available just mount it

Background: the target is my NAS that goes to sleep and wakes up on network traffic. So at least for the first requests it won't be available.

And when the notebook would be booted in a foreign network the NAS wouldn't even be available at all (or I start a VPN connection)










share|improve this question



























    up vote
    2
    down vote

    favorite












    There are lots of pages that show how to configure the system to automatically mount a network share accessed by CIFS (fstab, autofs, systemd.mount, probably even more). But they fail (at least my trials with the first two) when the server is not responding. With the update to Kubuntu 17.10 it even makes my system hang on boot with a black screen and syslog filled with:



    CIFS VFS: cifs_mount failed w/return code = -113


    And some:



    CIFS VFS: cifs_mount failed w/return code = -111


    So what is the recommended way to handle such a set up?



    • Mount a CIFS share at a given mount point (a KDE smb:// isn't enough)

    • Do everything automatically for every user

    • Take care that no problems occur when the target isn't available

    • When the target becomes available just mount it

    Background: the target is my NAS that goes to sleep and wakes up on network traffic. So at least for the first requests it won't be available.

    And when the notebook would be booted in a foreign network the NAS wouldn't even be available at all (or I start a VPN connection)










    share|improve this question

























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      There are lots of pages that show how to configure the system to automatically mount a network share accessed by CIFS (fstab, autofs, systemd.mount, probably even more). But they fail (at least my trials with the first two) when the server is not responding. With the update to Kubuntu 17.10 it even makes my system hang on boot with a black screen and syslog filled with:



      CIFS VFS: cifs_mount failed w/return code = -113


      And some:



      CIFS VFS: cifs_mount failed w/return code = -111


      So what is the recommended way to handle such a set up?



      • Mount a CIFS share at a given mount point (a KDE smb:// isn't enough)

      • Do everything automatically for every user

      • Take care that no problems occur when the target isn't available

      • When the target becomes available just mount it

      Background: the target is my NAS that goes to sleep and wakes up on network traffic. So at least for the first requests it won't be available.

      And when the notebook would be booted in a foreign network the NAS wouldn't even be available at all (or I start a VPN connection)










      share|improve this question















      There are lots of pages that show how to configure the system to automatically mount a network share accessed by CIFS (fstab, autofs, systemd.mount, probably even more). But they fail (at least my trials with the first two) when the server is not responding. With the update to Kubuntu 17.10 it even makes my system hang on boot with a black screen and syslog filled with:



      CIFS VFS: cifs_mount failed w/return code = -113


      And some:



      CIFS VFS: cifs_mount failed w/return code = -111


      So what is the recommended way to handle such a set up?



      • Mount a CIFS share at a given mount point (a KDE smb:// isn't enough)

      • Do everything automatically for every user

      • Take care that no problems occur when the target isn't available

      • When the target becomes available just mount it

      Background: the target is my NAS that goes to sleep and wakes up on network traffic. So at least for the first requests it won't be available.

      And when the notebook would be booted in a foreign network the NAS wouldn't even be available at all (or I start a VPN connection)







      mount fstab systemd automount cifs






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 28 at 22:43









      galoget

      2,1162820




      2,1162820










      asked Jan 28 at 20:21









      Chris

      11112




      11112

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1000755%2fautomount-cifs-that-gracefully-handles-a-non-responding-server%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1000755%2fautomount-cifs-that-gracefully-handles-a-non-responding-server%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491