Drive Mount
A FUSE filesystem driver that allows you to mount Koneksi storage as a local filesystem on Linux and macOS.
Features
Mount Koneksi storage as a local filesystem
Read and write files directly from/to Koneksi storage
Directory operations (create, delete)
File caching for improved performance
Cross-platform support (Linux and macOS)
Read-only mode option
Configurable cache settings
Requirements
Linux
FUSE 2.9+ installed
Go 1.21+ (for building from source)
macOS
macFUSE installed (https://osxfuse.github.io/)
Go 1.21+ (for building from source)
Installation
From Binary Release
Download the latest release for your platform from the releases page
Extract the archive:
tar -xzf koneksi-drive-<platform>-<arch>.tar.gz
Move the binary to your PATH:
sudo mv koneksi-drive /usr/local/bin/
Make it executable:
chmod +x /usr/local/bin/koneksi-drive
From Source
git clone https://github.com/koneksi/koneksi-drive.git
cd koneksi-drive
go build -o koneksi-drive .
sudo mv koneksi-drive /usr/local/bin/
Configuration
Create a configuration file at ~/.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)
Usage
Basic Mount
# Create a mount point
mkdir ~/koneksi-storage
# Mount Koneksi storage
koneksi-drive mount ~/koneksi-storage
# The filesystem is now mounted and accessible
ls ~/koneksi-storage
Mount Options
# Mount as read-only
koneksi-drive mount --readonly ~/koneksi-storage
# Mount with custom config file
koneksi-drive mount --config /path/to/config.yaml ~/koneksi-storage
# Mount with caching disabled
koneksi-drive mount --cache-ttl 0 ~/koneksi-storage
# Mount allowing other users to access
koneksi-drive mount --allow-other ~/koneksi-storage
Unmounting
To unmount the filesystem, press Ctrl+C
in the terminal where koneksi-drive is running, or use:
# Linux
fusermount -u ~/koneksi-storage
# macOS
umount ~/koneksi-storage
Performance Considerations
Caching: Enable caching for better performance with frequently accessed files
Network Latency: Performance depends on your network connection to the Koneksi server
Large Files: Streaming large files may be slower than local storage
Concurrent Access: Multiple processes can read/write simultaneously
Troubleshooting
Linux: "Transport endpoint is not connected"
This usually means the filesystem was not properly unmounted. Fix with:
fusermount -u ~/koneksi-storage
macOS: "mount_macfuse: the file system is not available"
Ensure macFUSE is properly installed:
brew install --cask macfuse
# Restart your computer after installation
Permission Denied
Check your Koneksi API credentials in the config file
Ensure the mount point directory exists and you have write permissions
Try running with
--debug
flag for more information
Debug Mode
Run with debug output to troubleshoot issues:
koneksi-drive mount --debug ~/koneksi-storage
Security Considerations
Config File: Keep your config file secure (chmod 600 ~/.koneksi-drive.yaml)
API Credentials: Never commit credentials to version control
Mount Permissions: Use appropriate uid/gid and umask settings
Network: Use HTTPS for API connections
Building from Source
Prerequisites
Go 1.21 or later
FUSE development headers
Linux:
sudo apt-get install libfuse-dev
(Debian/Ubuntu)macOS: Install macFUSE
Build Commands
# Clone the repository
git clone https://github.com/koneksi/koneksi-drive.git
cd koneksi-drive
# Download dependencies
go mod download
# Build for current platform
go build -o koneksi-drive .
# Build for specific platform
GOOS=linux GOARCH=amd64 go build -o koneksi-drive-linux-amd64 .
GOOS=darwin GOARCH=amd64 go build -o koneksi-drive-darwin-amd64 .
Contributing
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature
)Commit your changes (
git commit -m 'Add amazing feature'
)Push to the branch (
git push origin feature/amazing-feature
)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Last updated