Last active
June 2, 2020 22:04
-
-
Save ayush--s/fa40f406771eb36ed90e7fc52b7ec7aa to your computer and use it in GitHub Desktop.
S3FS setup with systemd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt install s3fs | |
echo "<redacted>" > ~/.passwd-s3fs | |
sudo nano /etc/systemd/system/s3fs.service | |
chmod 600 /home/ubuntu/.passwd-s3fs | |
sudo systemctl daemon-reload | |
sudo systemctl enable s3fs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=s3fs | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/bin/s3fs <bucketname> /home/ubuntu/data -o retries=4,use_cache=/home/ubuntu/.cache/s3fs,max_stat_cache_size=8000,endpoint="ap-south-1" | |
User=ubuntu | |
Group=ubuntu | |
WorkingDirectory=/home/ubuntu | |
ExecStop=/bin/fusermount -u /home/ubuntu/data | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment