Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

up vote 5 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 /etcd/fstab should work fine too, according to the s3fs faq:

s3fs#example.com /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
1  
Is that fstab line, it should be _netdev, otherwise mount will throw an error. –  Steve Nay Sep 15 '12 at 19:50

Your Answer

 
discard

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.