I successfully implement autofs to automatically mount s3 bucket to the server which running ubuntu server 14.04.5 by following this tutorials. but the number of bucket (that needs to automatically mounted) is dynamic, means its can be increase or decrease. so far I need to add/remove rule in autofs config whenever the bucket number changed.

the option command for mount those bucket is same. only path and bucket name that have difference. here is my configuration :
on /etc/auto.master

/- /etc/auto.s3bucket --timeout=30

on /etc/auto.s3bucket

[mount-point-bucket1] -fstype=fuse,uid,gid,etc,etc  :[tool-mounting]#bucket1
[mount-point-bucket2] -fstype=fuse,uid,gid,etc,etc  :[tool-mounting]#bucket2
[mount-point-bucketX] -fstype=fuse,uid,gid,etc,etc  :[tool-mounting]#bucketX

my question : Is there a built-in script or function in autofs to dynamically add or remove rule in the file configuration?. so I don't need to re-config whenever the bucket is decrease or increase.


first check your S3 access:

s3fs your-s3-bucket /mnt -o passwd_file=/path/to/your/secrets

if this works, enter this into your autofs config:

s3 / -fstype=fuse,passwd_file=/path/to/your/secrets :s3fs\#your-s3-bucket

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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