Skip to main content
Spacedrive detects and tracks storage volumes across all platforms, including local drives and cloud storage. The volume system enables intelligent file operations by understanding where data lives and how to move it efficiently.

How It Works

The volume system operates in two modes:
  1. Runtime Detection - Automatically discovers all mounted storage devices
  2. Volume Tracking - Persists volumes you choose to track across sessions
When you connect a drive or add cloud storage, Spacedrive detects it immediately. If you choose to track that volume, it remembers your preferences and recognizes it when reconnected.

Storage Backends

Spacedrive supports two types of storage backends:
  • Local Filesystems - Physical drives mounted on your system (APFS, NTFS, Ext4, etc.)
  • Cloud Storage - S3, Google Drive, Dropbox, OneDrive, and 40+ other services via OpenDAL

Volume Identification

Each volume gets a unique fingerprint based on hardware identifiers, capacity, and filesystem type:
This fingerprint remains stable even when mount points change.

Sync Ownership

Volumes serve as the ownership anchor for the sync system. Entries and locations reference a volume, inheriting ownership from the volume’s device. This indirection enables portable storage: when you plug an external drive into a different machine, updating the volume’s device reference transfers ownership of all associated files instantly. No bulk updates needed.
See Library Sync for details on how ownership flows through volumes and enables seamless device transfers.

Unified Addressing

Spacedrive uses service-native URIs for cloud volumes that match industry tools:
These URIs work identically to local volume paths and enable seamless operations across all storage backends. See Unified Addressing for complete details.

Volume Types

Mount Types

  • System - Root filesystem and boot partitions
  • External - USB drives and removable storage
  • Network - NFS, SMB mounts
  • Cloud - Cloud storage services (S3, Google Drive, Dropbox, OneDrive, etc.)

Disk Types

  • SSD - Solid state drives with fast random access
  • HDD - Traditional spinning disks
  • Network - Remote storage over network
  • Virtual - RAM disks and virtual filesystems

Filesystems

Spacedrive recognizes major filesystems including APFS, NTFS, Ext4, Btrfs, ZFS, FAT32, and ExFAT.

Cloud Services

Supports 40+ cloud services via OpenDAL:
  • S3 - Amazon S3, Cloudflare R2, MinIO, Wasabi, Backblaze B2
  • Google Drive - Consumer and Workspace accounts
  • Dropbox - Personal and Business
  • OneDrive - Personal and Business
  • Google Cloud Storage - GCS buckets
  • Azure Blob Storage - Azure containers

Using Volumes

Get Volume Information

Track Volumes

Convert a runtime-detected volume into a tracked volume:
Tracked volumes persist across sessions and can have custom names, colors, and icons.

Add Cloud Volumes

Add cloud storage as a tracked volume:

CLI Usage

Add cloud volumes from the command line:
Cloud volumes work identically to local volumes for indexing, searching, and file operations.

Volume Events

Monitor volume state changes:

Copy-on-Write and Server-Side Operations

Spacedrive uses optimal copy strategies based on the storage backend:
  • COW copies on supported filesystems are nearly instant regardless of file size
  • Server-side cloud copies avoid downloading/uploading data through your machine
  • Cross-cloud operations automatically stream through local system

Smart File Operations

Volume awareness enables optimal file operations:

Cloud-Specific Optimizations

Cloud volumes automatically use efficient operations:
  • Ranged Reads - Download only needed portions of files
  • Content Hashing - Sample-based hashing uses ~58KB for large files
  • Parallel Operations - Concurrent metadata and content fetches
  • Metadata Caching - Reduces redundant API calls

Performance Monitoring

Test volume read/write speeds:

Platform Detection

macOS

Uses diskutil and df to detect APFS volumes and identify SSD/HDD types.

Linux

Parses /sys/block/ and df output for filesystem and disk type information.

Windows

Uses PowerShell cmdlets for volume enumeration (implementation pending).

Cloud Storage

Uses OpenDAL for unified cloud service integration. Credentials are encrypted with library keys and stored securely in the OS keyring.

Supported Cloud Services

Fully integrated and tested:
  • S3 and Compatible - Amazon S3, Cloudflare R2, MinIO, Wasabi, Backblaze B2, DigitalOcean Spaces
Implemented with OpenDAL backend:
  • Google Drive
  • Dropbox
  • OneDrive
  • Google Cloud Storage
  • Azure Blob Storage
Note: OAuth flow for consumer cloud services (Google Drive, Dropbox, OneDrive) requires manual credential setup. Native OAuth integration coming soon.

Credential Security

Cloud credentials are:
  • Encrypted with library-specific keys using XChaCha20-Poly1305
  • Stored in OS keyring (Keychain on macOS, Credential Manager on Windows, Secret Service on Linux)
  • Never written to disk in plaintext
  • Automatically deleted when volumes are removed

Configuration

Cloud Volume Configuration

Cloud volumes require service-specific configuration:
The endpoint parameter enables use of S3-compatible services:
  • Cloudflare R2: https://<account>.r2.cloudflarestorage.com
  • MinIO: http://localhost:9000 or your server URL
  • Wasabi: https://s3.<region>.wasabisys.com
  • Backblaze B2: https://s3.<region>.backblazeb2.com
  • DigitalOcean Spaces: https://<region>.digitaloceanspaces.com

Error Handling

Cloud-Specific Errors

Cloud volumes may encounter additional error conditions:

Best Practices

Performance

  • Cache volume lookups for hot paths
  • Use COW or server-side operations when available
  • Check space before large operations
  • For cloud: Use ranged reads for metadata extraction

User Experience

  • Show tracking prompts for new external drives
  • Display volume capacity and network status in the UI
  • Allow custom naming and organization
  • Show cloud sync status and quota information

Reliability

  • Handle disconnections gracefully (especially for cloud)
  • Validate fingerprints before operations
  • Monitor available space and network connectivity
  • Implement retry logic for transient cloud errors

Security

  • Store cloud credentials encrypted in OS keyring using XChaCha20-Poly1305
  • Use library-specific encryption keys for credential protection
  • Credentials are bound to both library ID and volume fingerprint
  • OAuth 2.0 with PKCE support planned for Google Drive, Dropbox, OneDrive
  • Never log credentials, tokens, or sensitive configuration
  • Automatic credential cleanup when volumes are removed

Common Patterns

Adding Locations

When users add a location, suggest tracking its volume:

Space Checks

Before large operations:

Volume Statistics

Tracked volumes maintain statistics:
  • Total files and directories
  • Read/write performance metrics (local) or API latency (cloud)
  • Last seen timestamp
  • Last sync timestamp (for cloud volumes)
  • User preferences (favorite, color, icon)
These help users understand their storage usage and performance characteristics.

Content Deduplication Across Storage

Spacedrive uses consistent content hashing across all storage backends:
This enables true cross-storage deduplication:
  • Identify duplicates between local drives and cloud storage
  • Skip uploading files that already exist in cloud
  • Find files across all storage locations using content hash
Large files (>100KB) use sample-based hashing, transferring only ~58KB for content identification regardless of file size. This makes cloud indexing efficient even on slow connections.