|
1 |
| -# hypermount |
2 |
| -A FUSE-mountable distributed filesystem, built on Hyperdrive |
| 1 | +# ⏏️ hypermount |
| 2 | +A FUSE-mountable distributed filesystem, built with Hyperdrive. |
| 3 | + |
| 4 | +Hypermount lets your mount Hyperdrives as directories on both OSX and Linux. To generate and seed a new Hyperdrive, mounted at a just run: |
| 5 | +``` |
| 6 | +❯ hypermount mount me |
| 7 | +Mounted 8a18b05e95e2e20eca9e66cdeff5b926c7c553edc34c7ffc06054edbb1810f7e at friends/me |
| 8 | +``` |
| 9 | +This command will give you a Hyperdrive key you can share with others. A friend can subsequently mount this drive: |
| 10 | +``` |
| 11 | +❯ hypermount mount andrew 8a18b05e95e2e20eca9e66cdeff5b926c7c553edc34c7ffc06054edbb1810f7e |
| 12 | +Mounted 8a18b05e95e2e20eca9e66cdeff5b926c7c553edc34c7ffc06054edbb1810f7e at friends/andrew |
| 13 | +``` |
| 14 | + |
| 15 | +Once your drives are mounted, you can treat them as you would any other directory! |
| 16 | + |
| 17 | +To make it easier to mount multiple drives, Hypermount runs as a daemonized HTTP server. It maintains a database of mounted Hyperdrives, which it will automatically remount when the daemon is started and unmount when it's stopped. |
| 18 | + |
| 19 | +Under the hood, this module uses [corestore](https://github.com/andrewosh/corestore) to manage and seed your library of hypercores. |
| 20 | + |
| 21 | +## Installation |
| 22 | +``` |
| 23 | +npm i hypermount -g |
| 24 | +``` |
| 25 | + |
| 26 | +### Setup |
| 27 | + |
| 28 | +When you first install Hypermount, you'll need to perform a setup step that will install native, prebuilt FUSE bindings. We currently only provide bindings for OSX and Linux. The setup step is the only step that requires `sudo`. |
| 29 | +``` |
| 30 | +❯ hypermount setup |
| 31 | +Configuring FUSE... |
| 32 | +[sudo] password for andrewosh: |
| 33 | +Successfully configured FUSE! |
| 34 | +``` |
| 35 | + |
| 36 | +You should only need to perform this step once (it will persist across restarts). |
| 37 | + |
| 38 | +## Usage |
| 39 | + |
| 40 | +Hypermount provides an HTTP interface for mounting, unmounting, and providing status information about all current mounts. There's also a bundled CLI tool which wraps the HTTP interfaces and provides the following commands: |
| 41 | + |
| 42 | +#### `hypermount setup` |
| 43 | +Performs a one-time configuration step that installs FUSE. This command will prompt you for `sudo`. |
| 44 | + |
| 45 | +#### `hypermount mount <mountpoint> [key]` |
| 46 | +If a key is specified, create a Hyperdrive using that key. If not, generate a new one. Once the drive has been created, mount it at `mountpoint`. |
| 47 | + |
| 48 | +This command takes options: |
| 49 | +``` |
| 50 | +--sparse Create a sparse content feed. [boolean] [default: true] |
| 51 | +--sparseMetadata Create a sparse metadata feed. [boolean] [default: true] |
| 52 | +``` |
| 53 | + |
| 54 | +#### `hypermount unmount <mountpoint>` |
| 55 | +Unmount a Hyperdrive that's been previously mounted at `mountpoint`, if it exists. |
| 56 | + |
| 57 | +*Note: This command will currently not delete or unseed the Hyperdrive. Support for this will be added soon.* |
| 58 | + |
| 59 | +#### `hypermount list` |
| 60 | +Display information about all mounted Hyperdrives. |
| 61 | + |
| 62 | +The output takes the form: |
| 63 | +``` |
| 64 | +❯ hypermount list |
| 65 | +35127c7db33e884a8b5b054aa8bef510c6faf3688265f0d885241731bf0354b4 => /home/andrewosh/friends/a |
| 66 | + Network Stats: |
| 67 | + Metadata: |
| 68 | + Uploaded: 0 MB |
| 69 | + Downloaded: 0 MB |
| 70 | + Content: |
| 71 | + Uploaded: 0 MB |
| 72 | + Downloaded: 0 MB |
| 73 | +1fb343ab8362b84155e7554a42d023b376aa71cdc9d94ca9a4efee8a58326d03 => /home/andrewosh/friends/b |
| 74 | + Network Stats: |
| 75 | + Metadata: |
| 76 | + Uploaded: 0 MB |
| 77 | + Downloaded: 0 MB |
| 78 | + Content: |
| 79 | + Uploaded: 0 MB |
| 80 | + Downloaded: 0 MB |
| 81 | +... |
| 82 | +``` |
| 83 | + |
| 84 | +#### `hypermount status` |
| 85 | +Display status information about the Hypermount daemon. |
| 86 | + |
| 87 | +#### `hypermount start` |
| 88 | +Launch the Hypermount daemon. When this command is executed, it will use the current working directory as its storage/logging directory. This command must be run before any additional commands (except for `setup`) will work. |
| 89 | + |
| 90 | +Takes these options: |
| 91 | +``` |
| 92 | + --port The HTTP port that the daemon will bind to. [number] [default: 3101] |
| 93 | + --replicationPort The port that the hypercore replicator will bind to. [number] [default: 3102] |
| 94 | +``` |
| 95 | + |
| 96 | +#### `hypermount stop` |
| 97 | +Unmount all mounted Hyperdrives and stop the daemon. |
| 98 | + |
| 99 | +## License |
| 100 | + |
| 101 | +MIT |
0 commit comments