mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[GH-ISSUE #2080] How I made s3fs work #1053
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#1053
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Qlub53 on GitHub (Dec 21, 2022).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/2080
This is to share how I managed to mount my S3 bucket to an AWS EC2 instance. Hopefully it'll help people new to
s3fsas well as those who are still struggling.my-s3-bucketon AWS S3.s3fs-fusesudo amazon-linux-extras install epelsudo yum install s3fs-fusemkdir /my/mountpointecho ACCESS_KEY_ID:SECRET_ACCESS_KEY > ~/.passwd-s3fschmod 600 ~/.passwd-s3fss3fs my-s3-bucket /my/mountpoint -o passwd_file=./.passwd-s3fsecho ACCESS_KEY_ID:SECRET_ACCESS_KEY > /etc/passwd-s3fschmod 600 /etc/passwd-s3fs/etc/fstabsudo echo "my-s3-bucket /my/mountpoint fuse.s3fs _netdev,allow_other 0 0" >> /etc/fstabsudo echo "my-s3-bucket /my/mountpoint fuse.s3fs _netdev,allow_other,default_permissions,user,uid=1000,gid=1000 0 0" >> /etc/fstabwhere
uid=$(id -u)andgid=$(id -g)netfscd /usr/local/libsudo wget https://anduin.linuxfromscratch.org/BLFS/blfs-bootscripts/blfs-bootscripts-20220722.tar.xzsudo tar -xf blfs-bootscripts-20220722.tar.xzcd blfs-bootscripts-20220722/sudo make install-netfsmy-s3-bucketwill ✅ always be synced to/my/mountpointon my EC2.Version of s3fs being used (
s3fs --version)V1.85(commit:unknown)
Version of fuse being used (
pkg-config --modversion fuse,rpm -qi fuseordpkg -s fuse)2.9.2
Kernel information (
uname -r)8.10.155-138.670.amzn2.aarch64
GNU/Linux Distribution, if applicable (
cat /etc/os-release)NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3⭕amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
How to run s3fs, if applicable
[
s3fs my-s3-bucket /my/mountpoint -o passwd_file=./.passwd-s3fs] command line[
my-s3-bucket /my/mountpoint fuse.s3fs _netdev,allow_other 0 0] /etc/fstabs3fs syslog messages (
grep s3fs /var/log/syslog,journalctl | grep s3fs, ors3fs outputs)grep s3fs /var/log/syslogjournalctl | grep s3fsAfter reboot, with ~/.passwd-s3fs only
After reboot, with /etc/passwd-s3fs
s3fs outputsDetails about issue
@Qlub53 commented on GitHub (Dec 21, 2022):
Pro tip1️⃣ of the day 🚀 - credential file: system-wide 🆚 user-wide?
Use system-wide
/etc/passwd-s3fsonce and for all.Because user-wide
~/.passwd-s3fsonly works when you manually runs3fs -oand only stays in effect until reboot, while system-wide/etc/passwd-s3fsadditionally allows mounting on boot.When using user-wide
~/.passwd-s3fsand after reboot,journalctl | grep s3fslogs failure:When using system-wide
/etc/passwd-s3fsand after reboot,journalctl | grep s3fslogs success:@Qlub53 commented on GitHub (Dec 21, 2022):
Pro tip2️⃣ of the day 🚀 - NetFS
README.md says:
There aren't much information about
netfsonline, as far as I have explored.I followed this link https://www.linuxfromscratch.org/blfs/view/svn/basicnet/netfs.html to install
netfs.Refer to "Install
netfs" from above for more.ls -l /etc/init.d/ | grep netfsto check if installed.