HTTPS SSH

Repertory

Repertory allows you to mount Hyperspace or Sia blockchain storage solutions via FUSE on Linux/OS X or via WinFSP on Windows.

Details and Features

  • Optimized for Plex Media Server
  • Single application to mount either Sia or Hyperspace
  • Multi-user mounting is supported but is only recommended when running separate Sia/Hyperspace daemons on different ports
  • Only 1 Sia and 1 Hyperspace mount per user is supported
  • Cross-platform support (Linux 64-bit, OS X, Windows 64-bit)
  • Requires Sia 1.3.4 or higher

Downloads

Windows

Current Status

  • Alpha development (working on final alpha - 1.0.0-alpha.4)
  • Windows 1.0.0-alpha.3 released
  • Linux is in a testable/functional state. Testing is encouraged.
  • Submit issues here

What's Remaining?

  • OS X FUSE support
  • Unit tests
  • Integration tests
  • NTFS ADS support
  • NTFS permissions

Usage

Linux

Sia Mount

repertory -o big_writes ~/sia

Hyperspace Mount

repertory -o big_writes,hs ~/hyperspace

Mac OS X

Sia Mount

repertory -o big_writes ~/sia

Hyperspace Mount

repertory -o big_writes,hs ~/hyperspace

Windows

Sia Mount

repertory.exe T:

Hyperspace Mount

repertory.exe -hs T:

Data Locations

You will find all relevant configuration and logging files in the root data directory of repertory. Consult the list below to determine this location for your operating system.

  • Linux
    • ~/.local/repertory/sia
    • ~/.local/repertory/hyperspace
  • Mac OS X
    • ~/Library/Application Support/repertory/sia
    • ~/Library/Application Support/repertory/hyperspace
  • Windows
    • %LOCALAPPDATA%\repertory\sia
    • %LOCALAPPDATA%\repertory\hyperspace

Configuration Details

If you have enabled an API password in Sia or Hyperspace, it is recommended to pre-create repertory configuration prior to mounting.

Linux

Generate Sia Configuration

  • repertory -gc

Generate Hyperspace Configuration

  • repertory -gc -hs

Setting API Password

  • For Sia edit:
    • ~/.local/repertory/sia/config.json
  • For Hyperspace, edit:
    • ~/.local/repertory/hyperspace/config.json

Mac OS X

Generate Sia Configuration

  • repertory -gc

Generate Hyperspace Configuration

  • repertory -gc -hs

Setting API Password

  • For Sia edit:
    • ~/Libray/Application Support/repertory/sia/config.json
  • For Hyperspace, edit:
    • ~/Libray/Application Support/repertory/hyperspace/config.json

Windows

Generate Sia Configuration

  • repertory.exe -gc

Generate Hyperspace Configuration

  • repertory.exe -gc -hs

Setting API Password

  • For Sia edit:
    • %LOCALAPPDATA%\repertory\sia\config.json
  • For Hyperspace, edit:
    • %LOCALAPPDATA%\repertory\hyperspace\config.json

Sample Sia Configuration

{
  "ChunkDownloaderTimeoutSeconds": 30,
  "EnableDriveEvents": false,
  "EnableMaxCacheSize": true,
  "EventLevel": "Normal",
  "EvictionDelaySeconds": 1800,
  "HighFreqIntervalSeconds": 30,
  "HostConfig": {
    "AgentString": "Sia-Agent",
    "ApiPassword": "",
    "ApiPort": 9980,
    "HostNameOrIp": "localhost",
    "TimeoutMs": 10000
  },
  "LowFreqIntervalSeconds": 900,
  "MaxCacheSizeBytes": 10737418240,
  "MinimumRedundancy": 2.0,
  "ReadAheadCount": 3,
  "StorageByteMonth": "0"
}

Sample Hyperspace Configuration

{
  "ChunkDownloaderTimeoutSeconds": 30,
  "EnableDriveEvents": false,
  "EnableMaxCacheSize": true,
  "EventLevel": "Normal",
  "EvictionDelaySeconds": 1800,
  "HighFreqIntervalSeconds": 30,
  "HostConfig": {
    "AgentString": "Hyperspace-Agent",
    "ApiPassword": "",
    "ApiPort": 5580,
    "HostNameOrIp": "localhost",
    "TimeoutMs": 10000
  },
  "LowFreqIntervalSeconds": 900,
  "MaxCacheSizeBytes": 10737418240,
  "MinimumRedundancy": 2.0,
  "ReadAheadCount": 3,
  "StorageByteMonth": "0"
}

Configuration Settings

Configuration settings that are not documented below should be ignored for now as they are used internally.

StorageByteMonth should never be altered. On start-up, this value is used to calculate estimated storage space.

You can change or retrieve these values using the repertory executable:

repertory -get EnableDriveEvents

repertory -set EnableDriveEvents false

ChunkDownloaderTimeoutSeconds

Files that are not cached locally will download in ~40MiB chunks when a read or write operation occurs. This timeout value specifies the amount of time chunks should continue downloading after the last file handle has been closed.

EnableDriveEvents

When set to true, additional logging for FUSE on UNIX or WinFSP on Windows will occur. It's best to leave this value set to 'false' unless troubleshooting an issue as enabling it may have an adverse affect on performance.

EnableMaxCacheSize

If set to true, files will begin to be removed from the local cache as soon as MaxCacheSizeBytes and MinimumRedundancy have been met. This does not mean further attempts to write will fail when MaxCacheSizeBytes is reached. Writes will continue as long as there is enough local drive space to accommodate the operation.

If set to false, files will begin to be removed from the local cache as soon as MinimumRedundancy has been met.

In both cases, files that do not have any open handles will be chosen by oldest modification date for removal.

EventLevel

Internally, events are fired during certain operations. This setting determines which events should be logged to repertory.log. Valid values are Error, Warn, Normal, Debug, and Verbose.

MaxCacheSizeBytes

This value specifies the maximum amount of local space to consume before files are removed from cache. EnableMaxCacheSize must also be set to true for this value to to take affect.

ReadAheadCount

This value specifies the number of read-ahead chunks (~40MiB each) to use when downloading a file. This is a per-open file handle setting and will result in the creation of an equal number of threads.

MinimumRedundancy

Files are elected for removal once this value has been reached. Be aware that his value cannot be set to less than 1.5x.

Compiling

Linux 64-bit

  • Requires CMake 3.7 or above
  • Requires libcurl binary and development package
  • Requires uuid binary and development package
  • Requires libfuse 2.9.x binary and development package
  • Requires fuse 2.9.x binary/kernel module
  • Execute the following from the repertory source directory:
    • mkdir build && cd build
    • Debug build:
      • cmake -DCMAKE_BUILD_TYPE=Debug ..
    • Release build:
      • cmake -DCMAKE_BUILD_TYPE=Release ..
    • make
    • Optionally:
      • sudo make install

Mac OS X

  • Requires XCode from Apple Store
  • Requires CMake 3.7 or above
  • Requires FUSE for macOS 3.8.2
  • Execute the following from the repertory source directory:
    • mkdir build && cd build
    • Debug build:
      • cmake -DCMAKE_BUILD_TYPE=Debug ..
    • Release build:
      • cmake -DCMAKE_BUILD_TYPE=Release ..
    • make
    • Optionally:
      • sudo make install

Windows 7 or above 64-bit

  • Install cmake-3.12.1
  • Install Win32 OpenSSL 64-bit version
  • Install Visual Studio 2017
    • During installation, make sure to install:
      • C++ development support
      • Windows 10 SDK
  • Install WinFSP 1.3 2018.1
  • Use the CMake (cmake-gui) to create a Visual Studio solution
    • Configure Visual Studio 15 2017 Win64 as the CMake generator