드라이브 마운트
Linux 및 macOS에서 Koneksi 스토리지를 로컬 파일 시스템으로 마운트할 수 있는 FUSE 파일 시스템 드라이버입니다.
특징
Koneksi 스토리지를 로컬 파일 시스템으로 마운트
Koneksi 스토리지에서 직접 파일을 읽고 쓸 수 있습니다.
디렉토리 작업(생성, 삭제)
성능 향상을 위한 파일 캐싱
크로스 플랫폼 지원(Linux 및 macOS)
읽기 전용 모드 옵션
구성 가능한 캐시 설정
요구사항
Linux
FUSE 2.9 이상 설치됨
Go 1.21 이상 (소스 빌드용)
macOS
macFUSE 설치됨(https://osxfuse.github.io/)
Go 1.21 이상(소스 빌드용)
설치
바이너리 릴리스에서부터
릴리스 페이지에서 플랫폼에 맞는 최신 릴리스를 다운로드하세요.
아카이브 압축 해제:
tar -xzf koneksi-drive-<플랫폼>-<아키텍처>.tar.gz바이너리를 PATH로 이동:
sudo mv koneksi-drive /usr/local/bin/실행 가능하게 설정:
chmod +x /usr/local/bin/koneksi-drive
소스에서부터
git clone https://github.com/koneksi/koneksi-drive.git
cd koneksi-drive
go build -o koneksi-drive .
sudo mv koneksi-drive /usr/local/bin/구성
~/.koneksi-drive.yaml에 구성 파일을 만듭니다.
api:
base_url: "https://your-koneksi-instance.com"
client_id: "your-client-id"
client_secret: "your-client-secret"
directory_id: "your-directory-id"
timeout: 30s
retry_count: 3
mount:
readonly: false # Mount as read-only
allow_other: false # Allow other users to access the mount
uid: 1000 # User ID for file ownership
gid: 1000 # Group ID for file ownership
umask: 0022 # Default umask for new files
cache:
enabled: true
directory: "" # Cache directory (empty for temp dir)
ttl: 5m # Cache time-to-live
max_size: 1073741824 # Max cache size in bytes (1GB)용법
기본 마운트
# 마운트 지점 생성
mkdir ~/koneksi-storage
# Mount Koneksi storage
koneksi-drive mount ~/koneksi-storage
# 이제 파일 시스템이 마운트되어 접근 가능합니다.
ls ~/koneksi-storage마운트 옵션
# 읽기 전용으로 마운트
koneksi-drive mount --readonly ~/koneksi-storage
# 사용자 정의 구성 파일로 마운트
koneksi-drive mount --config /path/to/config.yaml ~/koneksi-storage
# 캐싱을 비활성화하여 마운트
koneksi-drive mount --cache-ttl 0 ~/koneksi-storage
# 다른 사용자가 액세스할 수 있도록 마운트
koneksi-drive mount --allow-other ~/koneksi-storage마운트 해제
파일 시스템을 마운트 해제하려면 koneksi-drive가 실행 중인 터미널에서 Ctrl+C를 누르거나 다음을 사용하세요
# Linux
fusermount -u ~/koneksi-storage
# macOS
umount ~/koneksi-storage성능 고려 사항
캐싱: 자주 액세스하는 파일의 성능 향상을 위해 캐싱을 활성화하세요.
네트워크 지연 시간: 성능은 Koneksi 서버와의 네트워크 연결에 따라 달라집니다.
대용량 파일: 대용량 파일을 스트리밍하는 경우 로컬 저장소보다 속도가 느릴 수 있습니다.
동시 액세스: 여러 프로세스가 동시에 읽고 쓸 수 있습니다.
문제 해결
Linux: "전송 엔드포인트가 연결되지 않았습니다"
이는 일반적으로 파일 시스템이 제대로 마운트 해제되지 않았음을 의미합니다. 다음과 같이 수정하세요:
fusermount -u ~/koneksi-storagemacOS: "mount_macfuse: 파일 시스템을 사용할 수 없습니다"
macFUSE가 제대로 설치되었는지 확인하세요:
brew install --cask macfuse
# 설치 후 컴퓨터를 다시 시작하세요권한이 거부되었습니다
설정 파일에서 Koneksi API 자격 증명을 확인하세요.
마운트 지점 디렉터리가 존재하고 쓰기 권한이 있는지 확인하세요.
자세한 내용은
--debug플래그를 사용하여 실행해 보세요.
디버그 모드
문제를 해결하려면 디버그 출력을 실행하세요.
koneksi-drive mount --debug ~/koneksi-storage보안 고려 사항
구성 파일: 구성 파일을 안전하게 보관하세요(chmod 600 ~/.koneksi-drive.yaml).
API 자격 증명: 버전 관리 시스템에 자격 증명을 커밋하지 마세요.
마운트 권한: 적절한 uid/gid 및 umask 설정을 사용하세요.
네트워크: API 연결에 HTTPS를 사용하세요.
소스에서 빌드
전제 조건
Go 1.21 이상
FUSE 개발 헤더
Linux: sudo apt-get install libfuse-dev (Debian/Ubuntu)
macOS: macFUSE 설치
빌드 명령
# 저장소 복제
git clone https://github.com/koneksi/koneksi-drive.git
cd koneksi-drive
# 종속성 다운로드
go mod download
# 현재 플랫폼용으로 빌드
go build -o koneksi-drive .
# 특정 플랫폼용으로 빌드
GOOS=linux GOARCH=amd64 go build -o koneksi-drive-linux-amd64 .
GOOS=darwin GOARCH=amd64 go build -o koneksi-drive-darwin-amd64 .기여
저장소를 포크합니다.
기능 브랜치를 생성합니다
(git checkout -b feature/amazing-feature).변경 사항을 커밋합니다
(git commit -m 'Add amazing feature').브랜치에 푸시합니다
(git push origin feature/amazing-feature).풀 리퀘스트를 엽니다.
라이선스
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.
감사의 말
Last updated