본문 바로가기
공부/AWS

[AWS] goofys로 Linux에 AWS S3 마운트

by haejang 2021. 7. 13.
728x90
728x90

 

https://github.com/kahing/goofys

 

kahing/goofys

a high-performance, POSIX-ish Amazon S3 file system written in Go - kahing/goofys

github.com

 

* AWS 자격 증명은 알아서... (aws confiugure 또는 IAM role)

** AWS EC2에서 진행

 

Amazon Linux 2

mkdir [마운트할 경로]

yum install -y fuse
wget https://github.com/kahing/goofys/releases/latest/download/goofys

chmod +x goofys
./goofys [마운트할 경로] [S3버킷 이름]

 

CentOS 7

mkdir [마운트할 경로]

yum install -y wget fuse awscli
wget https://github.com/kahing/goofys/releases/latest/download/goofys

chmod +x goofys
./goofys [마운트할 경로] [S3버킷 이름]

 

Ubuntu 18.04

mkdir [마운트할 경로]

apt-get update
apt-get install -y fuse awscli
wget https://github.com/kahing/goofys/releases/latest/download/goofys

chmod +x goofys
./goofys [마운트할 경로] [S3버킷 이름]

 

생각보다 동기화 빠르게 잘 되어서 놀람

aws s3 명령 맨날 내리기 귀찮거나 간단한 공유파일시스템 만들 때 괜찮게 쓸 수 있을듯

 

vi /etc/fstab

[goofys 경로]#[S3버킷 이름] [마운트할 경로] fuse [마운트 옵션]

(ex)
/root/goofys#honglab-s3 /s3 fuse _netdev,allow_other 0 0
  • _netdev : 네트워크 드라이브임을 의미 - 마운트 시도 전 네트워크 검사
  • allow_ather : 마운트된 디렉토리에 일반 유저 접근 허용

이 두 옵션은 꼭 넣어줘야 하나보다

 

 

 

728x90
728x90

댓글