Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using s3fs 1.33 on Ubuntu 9.10 x86.

I mount it manually with this command:

sudo /usr/bin/s3fs mybucket /mnt/s3/mybucket -ouse_cache=/tmp

How can I force the mount on boot?

I guess that I have to write something to /etc/fstab. But what? And how do I test it without rebooting the server?

share|improve this question
up vote 6 down vote accepted

Follow the Ubuntu RcLocalHowto to create /etc/init.d/local, and then put your command in that file. The mount will then happen automatically on boot.

To test, invoke /etc/init.d/local manually on the command line (as root). You should see that causes the mount to occur.

EDIT: doing the mount from /etc/fstab should work fine too, according to the s3fs faq: /mnt/s3/blah fuse _netdev,use_cache=/tmp,use_rrs=1,allow_other 0 0

Reason to prefer the /etc/init.d/local approach: it's simpler to set up, just put your existing mount script in that file.

Reason to prefer the fstab approach: it's a more standard way to do mounts, and someone who doesn't know about your setup can just look in /etc/fstab to determine what mounts your machine is making.

share|improve this answer
Is this the best way? Why not the fstab? – Alexander Gladysh Jan 10 '11 at 7:53
Is that fstab line, it should be _netdev, otherwise mount will throw an error. – Steve Nay Sep 15 '12 at 19:50
and how to test without rebooting -- mount -a will mount everything in fstab. Answered here with more detail. – Michael Greisman Apr 10 '15 at 18:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.