개요
blobfuse / blobfuse2는 Azure Blob Storage를 Linux 파일시스템에 FUSE로 마운트하는 오픈소스 도구. 로컬 파일처럼 Blob Storage에 접근 가능.
- GitHub: https://github.com/Azure/azure-storage-fuse
- 개발: Microsoft
- 현재 버전: blobfuse2 (Go 기반, blobfuse 후속)
설치
# Ubuntu
wget https://packages.microsoft.com/repos/blobfuse/pool/main/b/blobfuse2/blobfuse2_2.x.x_ubuntu22.04_amd64.deb
sudo dpkg -i blobfuse2_*.deb
# 또는 Microsoft 패키지 저장소 추가 후
sudo apt-get install blobfuse2설정 파일
# config.yaml
allow-other: true
logging:
level: log_warning
file-path: /var/log/blobfuse2.log
components:
- libfuse
- file_cache
- attr_cache
- azstorage
libfuse:
attribute-expiration-sec: 120
entry-expiration-sec: 120
file_cache:
path: /tmp/blobfuse_cache # 로컬 캐시 경로
timeout-sec: 120
max-size-mb: 4096
azstorage:
type: block
account-name: mystorageaccount
account-key: <your-account-key>
endpoint: https://mystorageaccount.blob.core.windows.net
container: mycontainer마운트 / 언마운트
# 마운트 포인트 생성
mkdir -p /mnt/blob
# 마운트
blobfuse2 mount /mnt/blob --config-file=config.yaml
# 백그라운드 마운트
blobfuse2 mount /mnt/blob --config-file=config.yaml &
# 마운트 확인
df -h | grep blobfuse
# 언마운트
blobfuse2 unmount /mnt/blob
# 또는
fusermount -u /mnt/blob/etc/fstab 자동 마운트
blobfuse2 /mnt/blob fuse _netdev,allow_other,--config-file=/etc/blobfuse2.yaml 0 0
주의사항
- 캐시 필수: 로컬 캐시 없으면 성능 매우 느림
- POSIX 완전 호환 아님: append 연산, 심볼릭 링크 제한
- 대용량 파일: 스트리밍 업로드 설정 권장
- SAS 토큰 or Managed Identity: account-key 대신 보안 강화 방법