Skip to content

Latest commit

 

History

History
70 lines (43 loc) · 2.89 KB

manual_setup.md

File metadata and controls

70 lines (43 loc) · 2.89 KB

Manual setup of QSFS

This document explains how to manually set up QSFS on ubuntu. When using another linux distribution some steps can be slightly different.

prerequisistes

fuse

Install the fuse kernel module : apt-get update && apt-get install fuse3

0-db's

In order to store the data in remote locations, you need to have 0-db's. 4 0-db's are needed for the metadata and m+n for the data, n being the number of 0-db's that can be lost without data loss ( m 0-db's are required to restore the data ).

How to deploy 0-db's for qsfs on the Threefold grid is explained in the manual.

If the 0-db's are deployed on the grid, make sure you can connect to the Theefold Planetary network. This is already working if you are setting up qsfs on a VM on the grid, if not this needs to be configured.

Directories

A qsfs mount point is required and a directory for qsfs to store the temporary data. This guide assumes /mnt/qsfs for the mount point and /data for the qsfs temporary data. Create them if they do not exist yet.

Install the individual components

wget the latest released binaries from the following components:

Make sure all binaries are executable:chmod a+x /bin/0-db-fs /bin/0-db /bin/zstor

0-stor

Adapt the example zstor configuration to use the previously created 0-db's, set an encryption key and save it at /etc/zstor_default/toml.

Now zstor can be started: /usr/local/bin/zstor -c /etc/zstor_default.toml monitor. If you don't want the process to block your terminal, you can start it in the background: nohup /tmp/zstor -c /etc/zstor_default.toml monitor &.

Local 0-db

First we will get the hook script. Download it to /bin/zdb-hook.sh and make sure it is executable (chmod +x /bin/zdb-hook.sh).

The local 0-db which is used by 0-db-fs can now be started:

/bin/0-db \
    --index /data/index \
    --data /data/data \
    --datasize 67108864 \
    --mode seq \
    --hook /bin/zdb-hook.sh \
    --background

0-db-fs

Finally, we will start 0-db-fs. This guides opts to mount the fuse filesystem in /mnt/qsfs.

/bin/0-db-fs /mnt/qsfs -o autons -o background

You should now have the qsfs filesystem mounted at /mnt/qsfs. As you write data, it will save it in the local 0-db, and it's data containers will be periodically encoded and uploaded to the backend data storage 0-db's.

It does not work

Check the troubleshooting guide.