Mount multiple s3fs buckets automatically with /etc/fstab
Perhaps your network wasn't up?
Minimal entry - with only one option (_netdev
= Mount after network is 'up')
<bucket name> <mount point> fuse.s3fs _netdev, 0 0
I am running Ubuntu 16.04 and multiple mounts works fine in /etc/fstab
.
Example similar to what I use for ftp image uploads (tested with extra bucket mount point):
mybucket1.mydomain.org /mnt/mybucket1 fuse.s3fs _netdev,allow_other,passwd_file=/home/ftpuser/.passwd-aws-s3fs,default_acl=public-read,uid=1001,gid=65534 0 0
mybucket2.mydomain.org /mnt/mybucket2 fuse.s3fs _netdev,allow_other,passwd_file=/home/ftpuser/.passwd-aws-s3fs,default_acl=public-read,uid=1001,gid=65534 0 0
sudo mount -a
to test the new entries and mount them (then do a reboot test).
If you wish to mount as non-root, look into the UID,GID options as per above. This isn't absolutely necessary if using the fuse option allow_other
as the permissions are '0777' on mounting.
WARNING: Updatedb (the locate
command uses this) indexes your system. You should check that either PRUNEFS
or PRUNEPATHS
in /etc/updatedb.conf
covers either your s3fs filesystem or s3fs mount point. The default is to 'prune' any s3fs filesystems, but it's worth checking. Otherwise, not only will your system slow down if you have many files in the bucket, but your AWS bill will increase. See the FAQ link for more.
Reference:
https://github.com/s3fs-fuse/s3fs-fuse/wiki/Fuse-Over-Amazon
https://github.com/s3fs-fuse/s3fs-fuse/wiki/FAQ