Reputation: 33
I'm working on Amazon AWS and want to mount S3 bucket "mybucket" on AWS ec2 instance. Then I can easily write/read files and it will be linked together.
I was following this tutorial:: https://www.emfluence.com/blog/amazon-web-services-integrating-s3-and-ec2-few-simple-steps
However, when I reboot the instance it got stuck and I can't connect to ssh. I thought this problem was with /etc/fstab entry which I have made:
s3fs#mybucket /mnt fuse defaults,uid=33,gid=33,allow_other,use_cache=/data,default_acl=public-read,use_cache=/tmp/s3-cache,passwd_file=/var/www/mysite/security/mybucket 0 0
then I found this issue resolution:: Mounting a S3 bucket using s3fs utility AWS and update my /etc/fstab entry::
s3fs#mybucket /mnt fuse allow_other,_netdev,nosuid,nodev,url=https://s3.amazonaws.com 0 0
now issue starts:: whenever I reboot my instance then my mount location "/mnt" not respond and shows this error::
-bash: cd: uploads: Transport endpoint is not connected
Then I first umount it with sudo umount /mnt
then run sudo mount -afv
and it starts working
Please guide me how can set this /etc/fstab entry? So I can mount mybucket automatically on every reboot.
Upvotes: 1
Views: 1644
Reputation: 4786
Try this entry on /etc/fstab
:
s3fs#mybucket /mnt fuse allow_other 0 0 -use_cache /tmp/cache
And make sure you don't have any other mount name /mnt
that came from the EC2 instance configuration.
Upvotes: 1