Linux: difference between using autofs with NFS and just using fstab

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











up vote
8
down vote

favorite
2












What is the difference between using auto.master and having autofs automount your NFS mountpoints versus just putting the info in fstab? Linux Red-Hat 5/6










share|improve this question

























    up vote
    8
    down vote

    favorite
    2












    What is the difference between using auto.master and having autofs automount your NFS mountpoints versus just putting the info in fstab? Linux Red-Hat 5/6










    share|improve this question























      up vote
      8
      down vote

      favorite
      2









      up vote
      8
      down vote

      favorite
      2






      2





      What is the difference between using auto.master and having autofs automount your NFS mountpoints versus just putting the info in fstab? Linux Red-Hat 5/6










      share|improve this question













      What is the difference between using auto.master and having autofs automount your NFS mountpoints versus just putting the info in fstab? Linux Red-Hat 5/6







      nfs fstab autofs






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 21 '13 at 15:36









      Gregg Leventhal

      2,889114174




      2,889114174




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          6
          down vote



          accepted










          With fstab, the advantage is the remote filesystem will be mounted on system (when the noauto mount option is not used).



          Additionally, it depends how the mount point is defined. There are two options which determines the recovery behaviour when the NFS client can't reach the server. With the hard option (default one), the boot process will pause if there is a problem mounting the nfs share and repeated tries are made to mount the share indefinitely. If the soft option is used, then the mount fails after retrans retransmissions have been sent.



          On the other hand, autofs only mounts nfs shares when they are needed and accessed.






          share|improve this answer




















          • That was my understanding of autofs as well; so autofs will react to a stat, or other filesystem request which references that mountpoint by first mounting the NFS volume and then completing the request? Does it immediately unmount the NFS after the operation completes?
            – Gregg Leventhal
            Dec 21 '13 at 18:12











          • @GreggLeventhal autofs can be configured to unmount after a period of inactivity. Setting the timeout to 0 would not be a good idea since it would lead to very frequent unmount-mount cycles when you access two files in succession.
            – Gilles
            Dec 21 '13 at 23:51










          • What is the benefit to that versus leaving it mounted via fstab?
            – Gregg Leventhal
            Dec 22 '13 at 15:06

















          up vote
          5
          down vote













          The benefit of autofs would be you can boot your server (and use it) as normal when an NFS mount is inaccessible. Only the user/application that wants to access the NFS mount will notice the unavailability. With fstab your server might refuse to boot (hard option), boot very slowly (hard option with timeout), or you might have to manually re-mount the unavailable NFS mount each time it failed (soft option). Please someone correct me if I'm wrong.






          share|improve this answer






















          • I found this article which adds at least one point to this answer: golinuxhub.com/2014/09/…
            – MrMas
            Feb 2 '16 at 16:30

















          up vote
          0
          down vote













          Generally as we know mounting at boot happens with/etc/fstab whereas autofs is the daemon that happens later. so generally it's good to have NFS shares on autofs so that there will not be any problem during boot process if NFS shares failed to load (happens sometimes). Advantage of autofs is due to autofs boot time is reduced because of unnecessary Mount point are reduced. Automatically unmount is also done as per the period. Network efficiency is increased.





          share








          New contributor




          Akhil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
          Check out our Code of Conduct.

















            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',
            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%2f106160%2flinux-difference-between-using-autofs-with-nfs-and-just-using-fstab%23new-answer', 'question_page');

            );

            Post as a guest






























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            6
            down vote



            accepted










            With fstab, the advantage is the remote filesystem will be mounted on system (when the noauto mount option is not used).



            Additionally, it depends how the mount point is defined. There are two options which determines the recovery behaviour when the NFS client can't reach the server. With the hard option (default one), the boot process will pause if there is a problem mounting the nfs share and repeated tries are made to mount the share indefinitely. If the soft option is used, then the mount fails after retrans retransmissions have been sent.



            On the other hand, autofs only mounts nfs shares when they are needed and accessed.






            share|improve this answer




















            • That was my understanding of autofs as well; so autofs will react to a stat, or other filesystem request which references that mountpoint by first mounting the NFS volume and then completing the request? Does it immediately unmount the NFS after the operation completes?
              – Gregg Leventhal
              Dec 21 '13 at 18:12











            • @GreggLeventhal autofs can be configured to unmount after a period of inactivity. Setting the timeout to 0 would not be a good idea since it would lead to very frequent unmount-mount cycles when you access two files in succession.
              – Gilles
              Dec 21 '13 at 23:51










            • What is the benefit to that versus leaving it mounted via fstab?
              – Gregg Leventhal
              Dec 22 '13 at 15:06














            up vote
            6
            down vote



            accepted










            With fstab, the advantage is the remote filesystem will be mounted on system (when the noauto mount option is not used).



            Additionally, it depends how the mount point is defined. There are two options which determines the recovery behaviour when the NFS client can't reach the server. With the hard option (default one), the boot process will pause if there is a problem mounting the nfs share and repeated tries are made to mount the share indefinitely. If the soft option is used, then the mount fails after retrans retransmissions have been sent.



            On the other hand, autofs only mounts nfs shares when they are needed and accessed.






            share|improve this answer




















            • That was my understanding of autofs as well; so autofs will react to a stat, or other filesystem request which references that mountpoint by first mounting the NFS volume and then completing the request? Does it immediately unmount the NFS after the operation completes?
              – Gregg Leventhal
              Dec 21 '13 at 18:12











            • @GreggLeventhal autofs can be configured to unmount after a period of inactivity. Setting the timeout to 0 would not be a good idea since it would lead to very frequent unmount-mount cycles when you access two files in succession.
              – Gilles
              Dec 21 '13 at 23:51










            • What is the benefit to that versus leaving it mounted via fstab?
              – Gregg Leventhal
              Dec 22 '13 at 15:06












            up vote
            6
            down vote



            accepted







            up vote
            6
            down vote



            accepted






            With fstab, the advantage is the remote filesystem will be mounted on system (when the noauto mount option is not used).



            Additionally, it depends how the mount point is defined. There are two options which determines the recovery behaviour when the NFS client can't reach the server. With the hard option (default one), the boot process will pause if there is a problem mounting the nfs share and repeated tries are made to mount the share indefinitely. If the soft option is used, then the mount fails after retrans retransmissions have been sent.



            On the other hand, autofs only mounts nfs shares when they are needed and accessed.






            share|improve this answer












            With fstab, the advantage is the remote filesystem will be mounted on system (when the noauto mount option is not used).



            Additionally, it depends how the mount point is defined. There are two options which determines the recovery behaviour when the NFS client can't reach the server. With the hard option (default one), the boot process will pause if there is a problem mounting the nfs share and repeated tries are made to mount the share indefinitely. If the soft option is used, then the mount fails after retrans retransmissions have been sent.



            On the other hand, autofs only mounts nfs shares when they are needed and accessed.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 21 '13 at 16:03









            dsmsk80

            2,175814




            2,175814











            • That was my understanding of autofs as well; so autofs will react to a stat, or other filesystem request which references that mountpoint by first mounting the NFS volume and then completing the request? Does it immediately unmount the NFS after the operation completes?
              – Gregg Leventhal
              Dec 21 '13 at 18:12











            • @GreggLeventhal autofs can be configured to unmount after a period of inactivity. Setting the timeout to 0 would not be a good idea since it would lead to very frequent unmount-mount cycles when you access two files in succession.
              – Gilles
              Dec 21 '13 at 23:51










            • What is the benefit to that versus leaving it mounted via fstab?
              – Gregg Leventhal
              Dec 22 '13 at 15:06
















            • That was my understanding of autofs as well; so autofs will react to a stat, or other filesystem request which references that mountpoint by first mounting the NFS volume and then completing the request? Does it immediately unmount the NFS after the operation completes?
              – Gregg Leventhal
              Dec 21 '13 at 18:12











            • @GreggLeventhal autofs can be configured to unmount after a period of inactivity. Setting the timeout to 0 would not be a good idea since it would lead to very frequent unmount-mount cycles when you access two files in succession.
              – Gilles
              Dec 21 '13 at 23:51










            • What is the benefit to that versus leaving it mounted via fstab?
              – Gregg Leventhal
              Dec 22 '13 at 15:06















            That was my understanding of autofs as well; so autofs will react to a stat, or other filesystem request which references that mountpoint by first mounting the NFS volume and then completing the request? Does it immediately unmount the NFS after the operation completes?
            – Gregg Leventhal
            Dec 21 '13 at 18:12





            That was my understanding of autofs as well; so autofs will react to a stat, or other filesystem request which references that mountpoint by first mounting the NFS volume and then completing the request? Does it immediately unmount the NFS after the operation completes?
            – Gregg Leventhal
            Dec 21 '13 at 18:12













            @GreggLeventhal autofs can be configured to unmount after a period of inactivity. Setting the timeout to 0 would not be a good idea since it would lead to very frequent unmount-mount cycles when you access two files in succession.
            – Gilles
            Dec 21 '13 at 23:51




            @GreggLeventhal autofs can be configured to unmount after a period of inactivity. Setting the timeout to 0 would not be a good idea since it would lead to very frequent unmount-mount cycles when you access two files in succession.
            – Gilles
            Dec 21 '13 at 23:51












            What is the benefit to that versus leaving it mounted via fstab?
            – Gregg Leventhal
            Dec 22 '13 at 15:06




            What is the benefit to that versus leaving it mounted via fstab?
            – Gregg Leventhal
            Dec 22 '13 at 15:06












            up vote
            5
            down vote













            The benefit of autofs would be you can boot your server (and use it) as normal when an NFS mount is inaccessible. Only the user/application that wants to access the NFS mount will notice the unavailability. With fstab your server might refuse to boot (hard option), boot very slowly (hard option with timeout), or you might have to manually re-mount the unavailable NFS mount each time it failed (soft option). Please someone correct me if I'm wrong.






            share|improve this answer






















            • I found this article which adds at least one point to this answer: golinuxhub.com/2014/09/…
              – MrMas
              Feb 2 '16 at 16:30














            up vote
            5
            down vote













            The benefit of autofs would be you can boot your server (and use it) as normal when an NFS mount is inaccessible. Only the user/application that wants to access the NFS mount will notice the unavailability. With fstab your server might refuse to boot (hard option), boot very slowly (hard option with timeout), or you might have to manually re-mount the unavailable NFS mount each time it failed (soft option). Please someone correct me if I'm wrong.






            share|improve this answer






















            • I found this article which adds at least one point to this answer: golinuxhub.com/2014/09/…
              – MrMas
              Feb 2 '16 at 16:30












            up vote
            5
            down vote










            up vote
            5
            down vote









            The benefit of autofs would be you can boot your server (and use it) as normal when an NFS mount is inaccessible. Only the user/application that wants to access the NFS mount will notice the unavailability. With fstab your server might refuse to boot (hard option), boot very slowly (hard option with timeout), or you might have to manually re-mount the unavailable NFS mount each time it failed (soft option). Please someone correct me if I'm wrong.






            share|improve this answer














            The benefit of autofs would be you can boot your server (and use it) as normal when an NFS mount is inaccessible. Only the user/application that wants to access the NFS mount will notice the unavailability. With fstab your server might refuse to boot (hard option), boot very slowly (hard option with timeout), or you might have to manually re-mount the unavailable NFS mount each time it failed (soft option). Please someone correct me if I'm wrong.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Oct 8 '17 at 8:30









            Styne666

            1637




            1637










            answered Mar 30 '15 at 13:10









            Ph. Bourdin

            5111




            5111











            • I found this article which adds at least one point to this answer: golinuxhub.com/2014/09/…
              – MrMas
              Feb 2 '16 at 16:30
















            • I found this article which adds at least one point to this answer: golinuxhub.com/2014/09/…
              – MrMas
              Feb 2 '16 at 16:30















            I found this article which adds at least one point to this answer: golinuxhub.com/2014/09/…
            – MrMas
            Feb 2 '16 at 16:30




            I found this article which adds at least one point to this answer: golinuxhub.com/2014/09/…
            – MrMas
            Feb 2 '16 at 16:30










            up vote
            0
            down vote













            Generally as we know mounting at boot happens with/etc/fstab whereas autofs is the daemon that happens later. so generally it's good to have NFS shares on autofs so that there will not be any problem during boot process if NFS shares failed to load (happens sometimes). Advantage of autofs is due to autofs boot time is reduced because of unnecessary Mount point are reduced. Automatically unmount is also done as per the period. Network efficiency is increased.





            share








            New contributor




            Akhil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.





















              up vote
              0
              down vote













              Generally as we know mounting at boot happens with/etc/fstab whereas autofs is the daemon that happens later. so generally it's good to have NFS shares on autofs so that there will not be any problem during boot process if NFS shares failed to load (happens sometimes). Advantage of autofs is due to autofs boot time is reduced because of unnecessary Mount point are reduced. Automatically unmount is also done as per the period. Network efficiency is increased.





              share








              New contributor




              Akhil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.



















                up vote
                0
                down vote










                up vote
                0
                down vote









                Generally as we know mounting at boot happens with/etc/fstab whereas autofs is the daemon that happens later. so generally it's good to have NFS shares on autofs so that there will not be any problem during boot process if NFS shares failed to load (happens sometimes). Advantage of autofs is due to autofs boot time is reduced because of unnecessary Mount point are reduced. Automatically unmount is also done as per the period. Network efficiency is increased.





                share








                New contributor




                Akhil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                Generally as we know mounting at boot happens with/etc/fstab whereas autofs is the daemon that happens later. so generally it's good to have NFS shares on autofs so that there will not be any problem during boot process if NFS shares failed to load (happens sometimes). Advantage of autofs is due to autofs boot time is reduced because of unnecessary Mount point are reduced. Automatically unmount is also done as per the period. Network efficiency is increased.






                share








                New contributor




                Akhil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.








                share


                share






                New contributor




                Akhil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.









                answered 5 mins ago









                Akhil

                1




                1




                New contributor




                Akhil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.





                New contributor





                Akhil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.






                Akhil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f106160%2flinux-difference-between-using-autofs-with-nfs-and-just-using-fstab%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    Peggy Mitchell

                    Palaiologos

                    The Forum (Inglewood, California)