Mountpoint for Amazon S3 정식 출시 및 테스트 (tistory.com)
Mountpoint for Amazon S3 정식 출시 및 테스트
23년 3월 14일에 고성능 오픈 소스 파일 클라이언트인 Mountpoint for Amazon S3의 알파 릴리스가 공개되었습니다. 그리고 공개 이후 5개월 뒤인 2023년 8월 14일에 정식 출시되었습니다. 이번 글에서는 정
ballenabox.tistory.com
이전 글에서 Mountpoint for Amazon S3에 대해 테스트를 해봤었습니다.
하지만 당시에 EC2를 중지 후 재시작하거나, 재부팅을 하면 마운트가 해제되는 현상이 있었습니다.
df -h로 조회도 되지 않고, fstab에 등록한 것도 아니니 당연한 일이었습니다.
하지만 마운트를 해서 사용 중일 때 그런 일이 발생하면 곤란하기에, service 등록을 통해 서버가 다시 시작되는 경우에도 자동으로 마운트할 수 있도록 해보겠습니다.
해당 이슈 관련해서는 아래에서 참고했습니다.
Auto mount bucket to local directory e.g. on instance reboot · Issue #441 · awslabs/mountpoint-s3
Tell us more about this new feature. Similar to EFS would be great to mount bucket(-s) once and have them automatically mounted until explicit umount command was not applied. Among options have fou...
github.com
요약하자면 service 파일을 생성해 enable 설정으로 자동으로 마운트되도록 한다는 것입니다.
# 자동 mount를 위한 service 파일. # 주의 : 사용자 관련 설정(Service-User/Group) 필요할 수 있음. # /usr/lib/systemd/system/mountpoint.serivce [Unit] Description=Mountpoint for Amazon S3 mount Wants=network.target After=cloud-init.target AssertPathIsDirectory=/home/ec2-user/mnt [Service] Type=forking User=ec2-user Group=ec2-user ExecStart=/usr/bin/mount-s3 junwoo-test-data /home/ec2-user/mnt ExecStop=/usr/bin/fusermount -u /home/ec2-user/mnt [Install] WantedBy=remote-fs.target
서비스 파일 등록 및 실행 전에 User와 같은 권한 쪽에서 잘 점검하신 후 진행하시기 바랍니다.
서비스 실행 및 enable 활성화 후 재부팅/중지 후 재시작 등 서버 재시작 과정을 거친 뒤에도 자동으로 마운트가 되었음을 확인했습니다.
'AWS' 카테고리의 다른 글
Mountpoint for Amazon S3 정식 출시 및 테스트 (1) | 2023.08.23 |
---|---|
AWS Application Migration Service(MGN) 실습 중 이모저모 (0) | 2022.12.22 |
AWS CodeDeploy 실습 중 이모저모 (0) | 2022.10.25 |
Linux/Windows CloudWatch Agent 설치 (0) | 2022.08.09 |
MongoDB with AWS Marketplace (0) | 2022.07.11 |
댓글