# 개요
- OS 에 NFS 와 OCI storage gateway를 설치해서 특정 path에 object storage를 마운트 한다. 이 path와 object storage는 동기화가 된다.
# 준비
- OCI Storage gateway 다운로드: https://www.oracle.com/downloads/cloud/oci-storage-gateway-downloads.html
# 설정
- device mapper를 docker storage driver로 설정:
- 참고: https://docs.oracle.com/en-us/iaas/Content/StorageGateway/Tasks/installingstoragegateway.htm
- /etc/sysconfig/docker-storage 설정에서
DOCKER_STORAGE_OPTIONS="--storage-driver devicemapper "
- /etc/docker/daemon.json 설정에서 변경 시 오류 발생 docker startup failure -> 해당 방법 말고 위에 방법으로 설정할 것
- nfsv4 설정
- 패키지 인스톨러로 nfs-utils, rpcbind설치
sudo yum install nfs-utils rpcbind
- 서비스 시작 및 확인
sudo systemctl start rpcbind
sudo systemctl start nfs-server
sudo systemctl start rpc-statd
sudo systemctl enable rpcbind
sudo systemctl enable nfs-server
sudo systemctl status nfs
- OCI storage gateway 설정
- 압축 해제: tar -xvzf ocisg??.tar.gz
- 해당 폴더에서 ./ocisg-install.sh -a 수행, path 설정, 나머지는 default로 설정
- default path: /opt/ocisg/
- cache: /opt/ocisg/cache
- metadata: /opt/ocisg/metadata
- log: /opt/ocisg/log
- 설치 후 나오는 management console로 접속하여 password 설정
- web console port open 설정
- create file system 클릭 후 object storage 정보 및 OCI 정보 입력
- API endpoint: https://objectstorage."지역명".oraclecloud.com
- compartment OCID
- tenant OCID
- user OCID
- OCI console 에 해당 유저로 들어가 API keys 생성, 여기에 만들어진 fingerprint와 private key 사용하여 입력
- 시스템에 마운트
mount -t nfs -o vers=4,port="NFS 포트" "서버명":/"마운트할 이름" "로컬마운트 포인트 path"
- mount 가 안되면 host 등록 여부 확인
- 동기화
# 참고
- Installing and Monitoring Storage Gateway(youtube): https://www.youtube.com/watch?v=RZcR_TMhtgA&t=199s
- Troubleshooting Storage Gateway: https://docs.oracle.com/en-us/iaas/Content/StorageGateway/Troubleshooting/troubleshootingstoragegateway.htm
댓글
댓글 쓰기