Browse Source

Experimenting with running JSFS on ROCK64.

main
Jason J. Gullickson 3 months ago
parent
commit
50497025d9
  1. 5
      README.md
  2. 2
      package.json
  3. 50
      rock64.md

5
README.md

@ -2,11 +2,6 @@
A general-purpose, deduplicating filesystem with a REST interface, jsfs is intended to provide low-level filesystem functions for Javascript applications. Additional functionality (private file indexes, token lockers, centralized authentication, etc.) are deliberately avoided here and will be implemented in a modular fashion on top of jsfs.
## STATUS
Based on field testing with large storage pools (>1TB) JSFS 4.x features a complete overhaul of the storage pool architecture. As a result of these changes there are significant performance improvements and storage pool size is no longer constrained by avaliable memory. Unfortunately some features have been depreciated out of necessity, at least temporarilly (if these features are needed they are still avaliable in the 3.0 release).
The 4.x series server is not compatible with 3.x pools, so a migration utility (`migrate_superblock.js`) has been included in the `tools` directory.
## REQUIREMENTS
* Node.js

2
package.json

@ -37,7 +37,7 @@
"test": "./node_modules/.bin/mocha --reporter spec"
},
"dependencies": {
"through": "2.3.8"
"through": "^2.3.8"
},
"devDependencies": {
"chai": "^3.5.0",

50
rock64.md

@ -0,0 +1,50 @@
# Installing JSFS on Rock64 Hardware
Pine64's [Rock64](https://www.pine64.org/devices/single-board-computers/rock64/) SBC is an inexpensive ARM computer well suited for running JSFS.
## Prerequisites
### Node.js
Node is built from source using the follow steps (~ minutes):
0. sudo apt-get install python g++ make
1. wget https://nodejs.org/dist/v14.17.5/node-v14.17.5.tar.gz
2. tar zxf node-v14.17.5.tar.gz
3. cd node-v14.15.5
4. ./configure
5. make -j4 (this step fails: g++: fatal error: Killed signal terminated program cc1plus
6. sudo make install
Try using precompiled binaries instead:
0. sudo apt install xz-utils
1. wget https://nodejs.org/dist/v14.17.5/node-v14.17.5-linux-arm64.tar.xz
2. tar -xf node-v14.17.5-linux-arm64.tar.xz
### Storage
You'll probably want to use something other than the boot SD card for storage. Attach something via USB and mount it at boot like so:
### Test Run
~/node-v14.17.5-linux-arm64/bin/node ./server.js
This fails with the following error:
```
internal/modules/cjs/loader.js:892
throw err;
^
Error: Cannot find module 'through'
```
Looks like someone added undocumented dependencies...
Let's try and resolve that:
~/node-v14.17.5-linux-arm64/bin/node ~/node-v14.17.5-linux-arm64/bin/npm install through
This time the server starts.
Loading…
Cancel
Save