Automatically mount bucket with s3fs on boot The 2019 Stack Overflow Developer Survey Results...

Can one be advised by a professor who is very far away?

What are the motivations for publishing new editions of an existing textbook, beyond new discoveries in a field?

Loose spokes after only a few rides

Is an up-to-date browser secure on an out-of-date OS?

Why isn't airport relocation done gradually?

What is the motivation for a law requiring 2 parties to consent for recording a conversation

Can we generate random numbers using irrational numbers like π and e?

Shouldn't "much" here be used instead of "more"?

Apparent duplicates between Haynes service instructions and MOT

How to notate time signature switching consistently every measure

How to manage monthly salary

The difference between dialogue marks

Button changing it's text & action. Good or terrible?

Why is the maximum length of OpenWrt’s root password 8 characters?

Why can Shazam fly?

Why not take a picture of a closer black hole?

Are there any other methods to apply to solving simultaneous equations?

What is the meaning of the verb "bear" in this context?

How to type this arrow in math mode?

When should I buy a clipper card after flying to OAK?

Is a "Democratic" Oligarchy-Style System Possible?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

FPGA - DIY Programming

Why didn't the Event Horizon Telescope team mention Sagittarius A*?



Automatically mount bucket with s3fs on boot



The 2019 Stack Overflow Developer Survey Results Are InHow to force s3fs mount on boots3fs and fuse: failed to open /dev/fuse: Permission deniedWriting to an s3 mounted directoryHow to repair the fstab file with current configurations3fs changing s3 permissions?s3fs-mounted S3 bucket shows bad filesizesmount_afp on linux, user rightsFUSE mounted Google Drive (via google-drive-ocamlfuse) for Wordpress and permission issuesAnsible can't git clone from enterprise git serverAutomatically mounting S3 bucket using s3fs on Amazon CentOS





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I use an Amazon S3 bucket to deliver some of my server's content.
I was able to mount it successfully, and grant Apache rights over it, but can't get it mounted properly at reboot.




I updated my /etc/fstab with this line, but nothing happens when I boot



s3fs#my-bucket-name /mnt/s3_bucket fuse allow_other,umask=227,uid=33,gid=33,use_cache=/root/cache 0 0


So, I tried another way, commented said line, and just put my command line in /etc/init.d/local :



#!/usr/bin/env bash
s3fs -o allow_other,uid=33,gid=33,umask=227,use_cache=/root/cache my-bucket-name /mnt/s3_bucket


... didn't work either.



I ended up putting a cron, and now, it works, but it feels terribly hacky to me, and I wonder why mounting it at start doesn't work.



//Crontab
*/10 * * * * ~/mountBucket.sh 1>/dev/null

//Mount script
#!/usr/bin/env bash
if [[ -d /mnt/s3_bucket/someBucketVirtualDirectoryName ]] ; then echo 'Bucket already mounted' ; else s3fs -o allow_other,uid=33,gid=33,umask=227,use_cache=/root/cache my-bucket-name /mnt/s3_bucket ; fi 1>/dev/null


Is there something I missed ?

I'm Using Ubuntu 14.04.4 LTS, with Fuse 2.9.2





EDIT :
Here is another unrelated, yet important performance issue I had to figure out by myself:



If your system includes locate and/or mlocate (and Ubuntu 14.04 does), you may want to add an exception, so that it does NOT scan your bucket.
I had to modify both my /etc/updatedb.conf and /etc/cron.daily/locate, adding " /mnt/my-bucket-name" to PRUNEPATHS and " fuse.s3fs" to PRUNEFS
I suppose adding fuse.s3fs should be enough, but... no time to take risks right now :)










share|improve this question































    0















    I use an Amazon S3 bucket to deliver some of my server's content.
    I was able to mount it successfully, and grant Apache rights over it, but can't get it mounted properly at reboot.




    I updated my /etc/fstab with this line, but nothing happens when I boot



    s3fs#my-bucket-name /mnt/s3_bucket fuse allow_other,umask=227,uid=33,gid=33,use_cache=/root/cache 0 0


    So, I tried another way, commented said line, and just put my command line in /etc/init.d/local :



    #!/usr/bin/env bash
    s3fs -o allow_other,uid=33,gid=33,umask=227,use_cache=/root/cache my-bucket-name /mnt/s3_bucket


    ... didn't work either.



    I ended up putting a cron, and now, it works, but it feels terribly hacky to me, and I wonder why mounting it at start doesn't work.



    //Crontab
    */10 * * * * ~/mountBucket.sh 1>/dev/null

    //Mount script
    #!/usr/bin/env bash
    if [[ -d /mnt/s3_bucket/someBucketVirtualDirectoryName ]] ; then echo 'Bucket already mounted' ; else s3fs -o allow_other,uid=33,gid=33,umask=227,use_cache=/root/cache my-bucket-name /mnt/s3_bucket ; fi 1>/dev/null


    Is there something I missed ?

    I'm Using Ubuntu 14.04.4 LTS, with Fuse 2.9.2





    EDIT :
    Here is another unrelated, yet important performance issue I had to figure out by myself:



    If your system includes locate and/or mlocate (and Ubuntu 14.04 does), you may want to add an exception, so that it does NOT scan your bucket.
    I had to modify both my /etc/updatedb.conf and /etc/cron.daily/locate, adding " /mnt/my-bucket-name" to PRUNEPATHS and " fuse.s3fs" to PRUNEFS
    I suppose adding fuse.s3fs should be enough, but... no time to take risks right now :)










    share|improve this question



























      0












      0








      0








      I use an Amazon S3 bucket to deliver some of my server's content.
      I was able to mount it successfully, and grant Apache rights over it, but can't get it mounted properly at reboot.




      I updated my /etc/fstab with this line, but nothing happens when I boot



      s3fs#my-bucket-name /mnt/s3_bucket fuse allow_other,umask=227,uid=33,gid=33,use_cache=/root/cache 0 0


      So, I tried another way, commented said line, and just put my command line in /etc/init.d/local :



      #!/usr/bin/env bash
      s3fs -o allow_other,uid=33,gid=33,umask=227,use_cache=/root/cache my-bucket-name /mnt/s3_bucket


      ... didn't work either.



      I ended up putting a cron, and now, it works, but it feels terribly hacky to me, and I wonder why mounting it at start doesn't work.



      //Crontab
      */10 * * * * ~/mountBucket.sh 1>/dev/null

      //Mount script
      #!/usr/bin/env bash
      if [[ -d /mnt/s3_bucket/someBucketVirtualDirectoryName ]] ; then echo 'Bucket already mounted' ; else s3fs -o allow_other,uid=33,gid=33,umask=227,use_cache=/root/cache my-bucket-name /mnt/s3_bucket ; fi 1>/dev/null


      Is there something I missed ?

      I'm Using Ubuntu 14.04.4 LTS, with Fuse 2.9.2





      EDIT :
      Here is another unrelated, yet important performance issue I had to figure out by myself:



      If your system includes locate and/or mlocate (and Ubuntu 14.04 does), you may want to add an exception, so that it does NOT scan your bucket.
      I had to modify both my /etc/updatedb.conf and /etc/cron.daily/locate, adding " /mnt/my-bucket-name" to PRUNEPATHS and " fuse.s3fs" to PRUNEFS
      I suppose adding fuse.s3fs should be enough, but... no time to take risks right now :)










      share|improve this question
















      I use an Amazon S3 bucket to deliver some of my server's content.
      I was able to mount it successfully, and grant Apache rights over it, but can't get it mounted properly at reboot.




      I updated my /etc/fstab with this line, but nothing happens when I boot



      s3fs#my-bucket-name /mnt/s3_bucket fuse allow_other,umask=227,uid=33,gid=33,use_cache=/root/cache 0 0


      So, I tried another way, commented said line, and just put my command line in /etc/init.d/local :



      #!/usr/bin/env bash
      s3fs -o allow_other,uid=33,gid=33,umask=227,use_cache=/root/cache my-bucket-name /mnt/s3_bucket


      ... didn't work either.



      I ended up putting a cron, and now, it works, but it feels terribly hacky to me, and I wonder why mounting it at start doesn't work.



      //Crontab
      */10 * * * * ~/mountBucket.sh 1>/dev/null

      //Mount script
      #!/usr/bin/env bash
      if [[ -d /mnt/s3_bucket/someBucketVirtualDirectoryName ]] ; then echo 'Bucket already mounted' ; else s3fs -o allow_other,uid=33,gid=33,umask=227,use_cache=/root/cache my-bucket-name /mnt/s3_bucket ; fi 1>/dev/null


      Is there something I missed ?

      I'm Using Ubuntu 14.04.4 LTS, with Fuse 2.9.2





      EDIT :
      Here is another unrelated, yet important performance issue I had to figure out by myself:



      If your system includes locate and/or mlocate (and Ubuntu 14.04 does), you may want to add an exception, so that it does NOT scan your bucket.
      I had to modify both my /etc/updatedb.conf and /etc/cron.daily/locate, adding " /mnt/my-bucket-name" to PRUNEPATHS and " fuse.s3fs" to PRUNEFS
      I suppose adding fuse.s3fs should be enough, but... no time to take risks right now :)







      ubuntu-14.04 boot fstab fuse s3fs






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 6 '17 at 8:08







      Balmipour

















      asked Apr 4 '17 at 22:57









      BalmipourBalmipour

      179210




      179210






















          2 Answers
          2






          active

          oldest

          votes


















          2














          You want to add _netdev to your fstab:




          s3fs#my-bucket-name /mnt/s3_bucket fuse _netdev,allow_other,umask=227,uid=33,gid=33,use_cache=/root/cache 0 0






          share|improve this answer
























          • Looks like it's as simple as this. Too bad this option was hardly ever mentioned, and nowhere explained in any of the tutorials or articles I found, while it seems absolutely necessary. Big thanks.

            – Balmipour
            Apr 5 '17 at 8:36








          • 1





            it's actually in s3fs's README github.com/s3fs-fuse/s3fs-fuse

            – khc
            Apr 5 '17 at 19:36











          • I noticed it after, but it's not explained on that page. There's one answer about it in the FAQ, which is quite clear, but I'm not used to Github enough to know pages include a FAQ. Half of the other blog/tutorial/forums pages I browsed didn't include the _netdev option when showing a fstab line, and for the other half, it's here among other stuff, but without explaination (while allow_other is often higlighted). Therefore, I had no idea of how important it could be. IMO, simple questions like this should be answered on SE anyway. Immediate google answers to basics helps going further

            – Balmipour
            Apr 6 '17 at 7:59



















          0














          I am having suse linux 12 with sp3 but even after using _netdev option in fstab. I am unable to mount s3fs during boot. I tried most solutions from various blogs but did not found any proper resolution to this problem.






          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "2"
            };
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fserverfault.com%2fquestions%2f842615%2fautomatically-mount-bucket-with-s3fs-on-boot%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            You want to add _netdev to your fstab:




            s3fs#my-bucket-name /mnt/s3_bucket fuse _netdev,allow_other,umask=227,uid=33,gid=33,use_cache=/root/cache 0 0






            share|improve this answer
























            • Looks like it's as simple as this. Too bad this option was hardly ever mentioned, and nowhere explained in any of the tutorials or articles I found, while it seems absolutely necessary. Big thanks.

              – Balmipour
              Apr 5 '17 at 8:36








            • 1





              it's actually in s3fs's README github.com/s3fs-fuse/s3fs-fuse

              – khc
              Apr 5 '17 at 19:36











            • I noticed it after, but it's not explained on that page. There's one answer about it in the FAQ, which is quite clear, but I'm not used to Github enough to know pages include a FAQ. Half of the other blog/tutorial/forums pages I browsed didn't include the _netdev option when showing a fstab line, and for the other half, it's here among other stuff, but without explaination (while allow_other is often higlighted). Therefore, I had no idea of how important it could be. IMO, simple questions like this should be answered on SE anyway. Immediate google answers to basics helps going further

              – Balmipour
              Apr 6 '17 at 7:59
















            2














            You want to add _netdev to your fstab:




            s3fs#my-bucket-name /mnt/s3_bucket fuse _netdev,allow_other,umask=227,uid=33,gid=33,use_cache=/root/cache 0 0






            share|improve this answer
























            • Looks like it's as simple as this. Too bad this option was hardly ever mentioned, and nowhere explained in any of the tutorials or articles I found, while it seems absolutely necessary. Big thanks.

              – Balmipour
              Apr 5 '17 at 8:36








            • 1





              it's actually in s3fs's README github.com/s3fs-fuse/s3fs-fuse

              – khc
              Apr 5 '17 at 19:36











            • I noticed it after, but it's not explained on that page. There's one answer about it in the FAQ, which is quite clear, but I'm not used to Github enough to know pages include a FAQ. Half of the other blog/tutorial/forums pages I browsed didn't include the _netdev option when showing a fstab line, and for the other half, it's here among other stuff, but without explaination (while allow_other is often higlighted). Therefore, I had no idea of how important it could be. IMO, simple questions like this should be answered on SE anyway. Immediate google answers to basics helps going further

              – Balmipour
              Apr 6 '17 at 7:59














            2












            2








            2







            You want to add _netdev to your fstab:




            s3fs#my-bucket-name /mnt/s3_bucket fuse _netdev,allow_other,umask=227,uid=33,gid=33,use_cache=/root/cache 0 0






            share|improve this answer













            You want to add _netdev to your fstab:




            s3fs#my-bucket-name /mnt/s3_bucket fuse _netdev,allow_other,umask=227,uid=33,gid=33,use_cache=/root/cache 0 0







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 5 '17 at 0:46









            khckhc

            561




            561













            • Looks like it's as simple as this. Too bad this option was hardly ever mentioned, and nowhere explained in any of the tutorials or articles I found, while it seems absolutely necessary. Big thanks.

              – Balmipour
              Apr 5 '17 at 8:36








            • 1





              it's actually in s3fs's README github.com/s3fs-fuse/s3fs-fuse

              – khc
              Apr 5 '17 at 19:36











            • I noticed it after, but it's not explained on that page. There's one answer about it in the FAQ, which is quite clear, but I'm not used to Github enough to know pages include a FAQ. Half of the other blog/tutorial/forums pages I browsed didn't include the _netdev option when showing a fstab line, and for the other half, it's here among other stuff, but without explaination (while allow_other is often higlighted). Therefore, I had no idea of how important it could be. IMO, simple questions like this should be answered on SE anyway. Immediate google answers to basics helps going further

              – Balmipour
              Apr 6 '17 at 7:59



















            • Looks like it's as simple as this. Too bad this option was hardly ever mentioned, and nowhere explained in any of the tutorials or articles I found, while it seems absolutely necessary. Big thanks.

              – Balmipour
              Apr 5 '17 at 8:36








            • 1





              it's actually in s3fs's README github.com/s3fs-fuse/s3fs-fuse

              – khc
              Apr 5 '17 at 19:36











            • I noticed it after, but it's not explained on that page. There's one answer about it in the FAQ, which is quite clear, but I'm not used to Github enough to know pages include a FAQ. Half of the other blog/tutorial/forums pages I browsed didn't include the _netdev option when showing a fstab line, and for the other half, it's here among other stuff, but without explaination (while allow_other is often higlighted). Therefore, I had no idea of how important it could be. IMO, simple questions like this should be answered on SE anyway. Immediate google answers to basics helps going further

              – Balmipour
              Apr 6 '17 at 7:59

















            Looks like it's as simple as this. Too bad this option was hardly ever mentioned, and nowhere explained in any of the tutorials or articles I found, while it seems absolutely necessary. Big thanks.

            – Balmipour
            Apr 5 '17 at 8:36







            Looks like it's as simple as this. Too bad this option was hardly ever mentioned, and nowhere explained in any of the tutorials or articles I found, while it seems absolutely necessary. Big thanks.

            – Balmipour
            Apr 5 '17 at 8:36






            1




            1





            it's actually in s3fs's README github.com/s3fs-fuse/s3fs-fuse

            – khc
            Apr 5 '17 at 19:36





            it's actually in s3fs's README github.com/s3fs-fuse/s3fs-fuse

            – khc
            Apr 5 '17 at 19:36













            I noticed it after, but it's not explained on that page. There's one answer about it in the FAQ, which is quite clear, but I'm not used to Github enough to know pages include a FAQ. Half of the other blog/tutorial/forums pages I browsed didn't include the _netdev option when showing a fstab line, and for the other half, it's here among other stuff, but without explaination (while allow_other is often higlighted). Therefore, I had no idea of how important it could be. IMO, simple questions like this should be answered on SE anyway. Immediate google answers to basics helps going further

            – Balmipour
            Apr 6 '17 at 7:59





            I noticed it after, but it's not explained on that page. There's one answer about it in the FAQ, which is quite clear, but I'm not used to Github enough to know pages include a FAQ. Half of the other blog/tutorial/forums pages I browsed didn't include the _netdev option when showing a fstab line, and for the other half, it's here among other stuff, but without explaination (while allow_other is often higlighted). Therefore, I had no idea of how important it could be. IMO, simple questions like this should be answered on SE anyway. Immediate google answers to basics helps going further

            – Balmipour
            Apr 6 '17 at 7:59













            0














            I am having suse linux 12 with sp3 but even after using _netdev option in fstab. I am unable to mount s3fs during boot. I tried most solutions from various blogs but did not found any proper resolution to this problem.






            share|improve this answer




























              0














              I am having suse linux 12 with sp3 but even after using _netdev option in fstab. I am unable to mount s3fs during boot. I tried most solutions from various blogs but did not found any proper resolution to this problem.






              share|improve this answer


























                0












                0








                0







                I am having suse linux 12 with sp3 but even after using _netdev option in fstab. I am unable to mount s3fs during boot. I tried most solutions from various blogs but did not found any proper resolution to this problem.






                share|improve this answer













                I am having suse linux 12 with sp3 but even after using _netdev option in fstab. I am unable to mount s3fs during boot. I tried most solutions from various blogs but did not found any proper resolution to this problem.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 13 mins ago









                Mirza Faisal BaigMirza Faisal Baig

                11




                11






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Server Fault!


                    • 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%2fserverfault.com%2fquestions%2f842615%2fautomatically-mount-bucket-with-s3fs-on-boot%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

                    As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

                    Список ссавців Італії Природоохоронні статуси | Список |...

                    Українські прізвища Зміст Історичні відомості |...