autofs shares not updated after reload












1














What's the best way to make autofs aware of any changes to its map files (e.g. changes in auto.home below) without the need to stop the service on RHEL 6.7?



According to autofs man page




If a map is modified then the change will become effective immediately. If the auto.master map is modified then the autofs script must be rerun to activate the changes.




However, if I change my auto.home the changes are not automatically seen by autofs. In addition, if I then run service autofs reload the changes are still not seen. The changes become effective only after I run service autofs restart. However, this would require all the users to stop working on any NFS-shared folders until the restart of the service completes.



Shouldn't the changes take effect automatically or at least after I run service autofs reload? What am I doing wrong here?



See below for the configuration I use:





I have the following simple configuration on two RedHat Linux 6.7 machines, one is acting as the NFS server and the second as the client.



NFS Server:



$ cat /etc/exports
/home/user1/NFS-test *(rw,sync)
/home/user2/NFS-test *(rw,sync)


NFS Client:



$ cat /etc/auto.master
/misc /etc/auto.misc
/net -hosts
/- /etc/auto.home --temeout=300
+auto.master

$ cat /etc/auto.home
/home/user1/NFS-test -ro,soft,intr server:/home/user1/NFS-test
/home/user2/NFS-test -ro,soft,intr server:/home/user2/NFS-test


This works fine and both users (user1 and user2) are able to see their own NFS-test directory under their home folder on the client machine.



Now the second line is removed from auto.home such that



$ cat /etc/auto.home
/home/user1/NFS-test -ro,soft,intr server:/home/user1/NFS-test


Then I run service autofs reload in order to update the shares. However, the change in auto.home is not seen and /home/user2/NFS-test continues to be accessible from the client machine.



If on the other hand I run service autofs restart then the mapping is correctly updated /home/user2/NFS-test is not visible on the client.



I would like to be able to refresh the NFS shares in response to changes in auto.home without needing to stop autofs first in order to avoid asking all the users to logout first. Is this possible with reload? Is there another way for doing this?





UPDATE



Since my setup is relatively small (1 server and 3 clients) and with only two folders being exported (one read-only and one read-write), I decided to drop the use of autofs and use directly NFS by editing /etc/fstab on each client. For such a small setup I hope that there won't be any noticable difference in performance compared to autofs. If someone thinks otherwise, please let me know.



In case someone is interested, here is the setup I went for:



The server exports the following folders:





  • /export: where all the software will be located (read-only)


  • /home/shared_homes: here each user has a folder which is exported to all clients and which is automatically linked in to its home directory. For example, the user bob101 will have a folder /home/shared_homes/bob101 which will be linked to /home/bob101/mySharedWorkspace










share|improve this question





























    1














    What's the best way to make autofs aware of any changes to its map files (e.g. changes in auto.home below) without the need to stop the service on RHEL 6.7?



    According to autofs man page




    If a map is modified then the change will become effective immediately. If the auto.master map is modified then the autofs script must be rerun to activate the changes.




    However, if I change my auto.home the changes are not automatically seen by autofs. In addition, if I then run service autofs reload the changes are still not seen. The changes become effective only after I run service autofs restart. However, this would require all the users to stop working on any NFS-shared folders until the restart of the service completes.



    Shouldn't the changes take effect automatically or at least after I run service autofs reload? What am I doing wrong here?



    See below for the configuration I use:





    I have the following simple configuration on two RedHat Linux 6.7 machines, one is acting as the NFS server and the second as the client.



    NFS Server:



    $ cat /etc/exports
    /home/user1/NFS-test *(rw,sync)
    /home/user2/NFS-test *(rw,sync)


    NFS Client:



    $ cat /etc/auto.master
    /misc /etc/auto.misc
    /net -hosts
    /- /etc/auto.home --temeout=300
    +auto.master

    $ cat /etc/auto.home
    /home/user1/NFS-test -ro,soft,intr server:/home/user1/NFS-test
    /home/user2/NFS-test -ro,soft,intr server:/home/user2/NFS-test


    This works fine and both users (user1 and user2) are able to see their own NFS-test directory under their home folder on the client machine.



    Now the second line is removed from auto.home such that



    $ cat /etc/auto.home
    /home/user1/NFS-test -ro,soft,intr server:/home/user1/NFS-test


    Then I run service autofs reload in order to update the shares. However, the change in auto.home is not seen and /home/user2/NFS-test continues to be accessible from the client machine.



    If on the other hand I run service autofs restart then the mapping is correctly updated /home/user2/NFS-test is not visible on the client.



    I would like to be able to refresh the NFS shares in response to changes in auto.home without needing to stop autofs first in order to avoid asking all the users to logout first. Is this possible with reload? Is there another way for doing this?





    UPDATE



    Since my setup is relatively small (1 server and 3 clients) and with only two folders being exported (one read-only and one read-write), I decided to drop the use of autofs and use directly NFS by editing /etc/fstab on each client. For such a small setup I hope that there won't be any noticable difference in performance compared to autofs. If someone thinks otherwise, please let me know.



    In case someone is interested, here is the setup I went for:



    The server exports the following folders:





    • /export: where all the software will be located (read-only)


    • /home/shared_homes: here each user has a folder which is exported to all clients and which is automatically linked in to its home directory. For example, the user bob101 will have a folder /home/shared_homes/bob101 which will be linked to /home/bob101/mySharedWorkspace










    share|improve this question



























      1












      1








      1







      What's the best way to make autofs aware of any changes to its map files (e.g. changes in auto.home below) without the need to stop the service on RHEL 6.7?



      According to autofs man page




      If a map is modified then the change will become effective immediately. If the auto.master map is modified then the autofs script must be rerun to activate the changes.




      However, if I change my auto.home the changes are not automatically seen by autofs. In addition, if I then run service autofs reload the changes are still not seen. The changes become effective only after I run service autofs restart. However, this would require all the users to stop working on any NFS-shared folders until the restart of the service completes.



      Shouldn't the changes take effect automatically or at least after I run service autofs reload? What am I doing wrong here?



      See below for the configuration I use:





      I have the following simple configuration on two RedHat Linux 6.7 machines, one is acting as the NFS server and the second as the client.



      NFS Server:



      $ cat /etc/exports
      /home/user1/NFS-test *(rw,sync)
      /home/user2/NFS-test *(rw,sync)


      NFS Client:



      $ cat /etc/auto.master
      /misc /etc/auto.misc
      /net -hosts
      /- /etc/auto.home --temeout=300
      +auto.master

      $ cat /etc/auto.home
      /home/user1/NFS-test -ro,soft,intr server:/home/user1/NFS-test
      /home/user2/NFS-test -ro,soft,intr server:/home/user2/NFS-test


      This works fine and both users (user1 and user2) are able to see their own NFS-test directory under their home folder on the client machine.



      Now the second line is removed from auto.home such that



      $ cat /etc/auto.home
      /home/user1/NFS-test -ro,soft,intr server:/home/user1/NFS-test


      Then I run service autofs reload in order to update the shares. However, the change in auto.home is not seen and /home/user2/NFS-test continues to be accessible from the client machine.



      If on the other hand I run service autofs restart then the mapping is correctly updated /home/user2/NFS-test is not visible on the client.



      I would like to be able to refresh the NFS shares in response to changes in auto.home without needing to stop autofs first in order to avoid asking all the users to logout first. Is this possible with reload? Is there another way for doing this?





      UPDATE



      Since my setup is relatively small (1 server and 3 clients) and with only two folders being exported (one read-only and one read-write), I decided to drop the use of autofs and use directly NFS by editing /etc/fstab on each client. For such a small setup I hope that there won't be any noticable difference in performance compared to autofs. If someone thinks otherwise, please let me know.



      In case someone is interested, here is the setup I went for:



      The server exports the following folders:





      • /export: where all the software will be located (read-only)


      • /home/shared_homes: here each user has a folder which is exported to all clients and which is automatically linked in to its home directory. For example, the user bob101 will have a folder /home/shared_homes/bob101 which will be linked to /home/bob101/mySharedWorkspace










      share|improve this question















      What's the best way to make autofs aware of any changes to its map files (e.g. changes in auto.home below) without the need to stop the service on RHEL 6.7?



      According to autofs man page




      If a map is modified then the change will become effective immediately. If the auto.master map is modified then the autofs script must be rerun to activate the changes.




      However, if I change my auto.home the changes are not automatically seen by autofs. In addition, if I then run service autofs reload the changes are still not seen. The changes become effective only after I run service autofs restart. However, this would require all the users to stop working on any NFS-shared folders until the restart of the service completes.



      Shouldn't the changes take effect automatically or at least after I run service autofs reload? What am I doing wrong here?



      See below for the configuration I use:





      I have the following simple configuration on two RedHat Linux 6.7 machines, one is acting as the NFS server and the second as the client.



      NFS Server:



      $ cat /etc/exports
      /home/user1/NFS-test *(rw,sync)
      /home/user2/NFS-test *(rw,sync)


      NFS Client:



      $ cat /etc/auto.master
      /misc /etc/auto.misc
      /net -hosts
      /- /etc/auto.home --temeout=300
      +auto.master

      $ cat /etc/auto.home
      /home/user1/NFS-test -ro,soft,intr server:/home/user1/NFS-test
      /home/user2/NFS-test -ro,soft,intr server:/home/user2/NFS-test


      This works fine and both users (user1 and user2) are able to see their own NFS-test directory under their home folder on the client machine.



      Now the second line is removed from auto.home such that



      $ cat /etc/auto.home
      /home/user1/NFS-test -ro,soft,intr server:/home/user1/NFS-test


      Then I run service autofs reload in order to update the shares. However, the change in auto.home is not seen and /home/user2/NFS-test continues to be accessible from the client machine.



      If on the other hand I run service autofs restart then the mapping is correctly updated /home/user2/NFS-test is not visible on the client.



      I would like to be able to refresh the NFS shares in response to changes in auto.home without needing to stop autofs first in order to avoid asking all the users to logout first. Is this possible with reload? Is there another way for doing this?





      UPDATE



      Since my setup is relatively small (1 server and 3 clients) and with only two folders being exported (one read-only and one read-write), I decided to drop the use of autofs and use directly NFS by editing /etc/fstab on each client. For such a small setup I hope that there won't be any noticable difference in performance compared to autofs. If someone thinks otherwise, please let me know.



      In case someone is interested, here is the setup I went for:



      The server exports the following folders:





      • /export: where all the software will be located (read-only)


      • /home/shared_homes: here each user has a folder which is exported to all clients and which is automatically linked in to its home directory. For example, the user bob101 will have a folder /home/shared_homes/bob101 which will be linked to /home/bob101/mySharedWorkspace







      nfs autofs






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 2 '15 at 9:58

























      asked Aug 25 '15 at 22:56









      Zots

      613




      613






















          1 Answer
          1






          active

          oldest

          votes


















          0














          You are using direct map. For direct map, you need to restart automount. I would suggest you to use indirect map for what you want to do.






          share|improve this answer





















          • any idea why I might be having the same issue mentioned above with indirect maps??
            – Rashmica
            Sep 18 '17 at 5:20











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f225497%2fautofs-shares-not-updated-after-reload%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You are using direct map. For direct map, you need to restart automount. I would suggest you to use indirect map for what you want to do.






          share|improve this answer





















          • any idea why I might be having the same issue mentioned above with indirect maps??
            – Rashmica
            Sep 18 '17 at 5:20
















          0














          You are using direct map. For direct map, you need to restart automount. I would suggest you to use indirect map for what you want to do.






          share|improve this answer





















          • any idea why I might be having the same issue mentioned above with indirect maps??
            – Rashmica
            Sep 18 '17 at 5:20














          0












          0








          0






          You are using direct map. For direct map, you need to restart automount. I would suggest you to use indirect map for what you want to do.






          share|improve this answer












          You are using direct map. For direct map, you need to restart automount. I would suggest you to use indirect map for what you want to do.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 26 '15 at 19:31









          edvwkh

          1




          1












          • any idea why I might be having the same issue mentioned above with indirect maps??
            – Rashmica
            Sep 18 '17 at 5:20


















          • any idea why I might be having the same issue mentioned above with indirect maps??
            – Rashmica
            Sep 18 '17 at 5:20
















          any idea why I might be having the same issue mentioned above with indirect maps??
          – Rashmica
          Sep 18 '17 at 5:20




          any idea why I might be having the same issue mentioned above with indirect maps??
          – Rashmica
          Sep 18 '17 at 5:20


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f225497%2fautofs-shares-not-updated-after-reload%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Morgemoulin

          Scott Moir

          Souastre