A dead simple, fast SFTP file system

Star Fork Follow @RainMark

Oxfs is a user-space network file system similar to SSHFS, and the underlying data transfer is based on the SFTP protocol. Oxfs introduces an asynchronous refresh policy to solve the jamming problem caused by the mismatch between network speed and user operation file speed. When Oxfs writes a file, it first writes to the local cache file and submits an asynchronous update task to update the content to the remote host. Similarly, when reading a file, it is preferred to read from a local cache file. Oxfs's data cache eventually falls to disk, and even if it is remounted, the history cache can still be used.

It can be said that Oxfs is a better alternative to SSHFS :)

$ sudo apt-get install python3.7
$ python3.7 -m pip install oxfs --user
$ mkdir remote
$ sudo oxfs -s user@xxx.xxx.xxx.xxx -m remote -r /home/oxfs -c /tmp/oxfs
$ brew install python3
$ mkdir ~/.venv
$ python3 -m venv ~/.venv/oxfs
$ source ~/.venv/oxfs/bin/activate
$ pip install oxfs
$ mkdir remote
$ sudo oxfs -s user@xxx.xxx.xxx.xxx -m remote -r /home/oxfs -c /tmp/oxfs
Get Help
$ oxfs --help
usage: oxfs [-h] [-s HOST] [-p PORT] [-m MOUNT_POINT] [-r REMOTE_PATH]
            [-c CACHE_PATH] [-l LOGGING] [-d] [-v]

optional arguments:
  -h, --help            show this help message and exit
  -s HOST, --host HOST  ssh host (for example: root@
  -p PORT, --port PORT  oxfs apiserver port, default: 10010)
  -m MOUNT_POINT, --mount_point MOUNT_POINT mount point
  -r REMOTE_PATH, --remote_path REMOTE_PATH remote path, default: /
  -c CACHE_PATH, --cache_path CACHE_PATH oxfs files cache path
  -l LOGGING, --logging LOGGING set log file, default: /tmp/oxfs.log
  -d, --daemon          run in background
  -v, --verbose         print verbose info
$ iozone -R -b output.xls -p -c -r 1k -s 20m -l 1 -u 1