Skip to content

Instantly share code, notes, and snippets.

@moracabanas
Last active September 9, 2022 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moracabanas/e2f27ed7d678a5a519854937f4353d83 to your computer and use it in GitHub Desktop.
Save moracabanas/e2f27ed7d678a5a519854937f4353d83 to your computer and use it in GitHub Desktop.
Minio S3fs setup
  1. Install s3fs
sudo apt update
sudo apt install s3fs
  1. Store your credentials on /etc/passwd-s3fs file
echo "ACCESS_KEY:SECRET_KEY" | sudo tee /etc/passwd-s3fs
  1. Set permissions
sudo chmod 600 /etc/passwd-s3fs
  1. Create an empty directory as a mount point for your s3 bucket
sudo mkdir /mnt/<<dir-name>>
  1. Make sure user_allow_other is uncommented in /etc/fuse.conf

Manual Mount

6a) Manually mount the bucket from your minio object storage

s3fs <<bucket-name>> /mnt/<<dir-name>> -o passwd_file=/etc/passwd-s3fs,use_path_request_style,allow_other,umask=000,url=http://<<s3.exampleminio.com>>

You can check it by

mout | grep s3fs

If everything OK you should see:
s3fs on /mnt/<<dir-name>> type fuse.s3fs (rw,relatime,user_id=0,group_id=0,allow_other)

Auto Mount at startup

6b) Edit fstab

sudo nano /etc/fstab

Add this line WITH YOUR DATA

s3fs#<<bucket>> /mnt/<<dir-name>> fuse _netdev,allow_other,umask=000,use_path_request_style,passwd_file=/etc/passwd-s3fs,url=http://<<s3.exampleminio.com>> 0 0
  1. Reboot or init 6

Thats it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment