A basic simple filesystem using a database as backend store.
docker build -t sqlfs docker/
docker run --device /dev/fuse \
--cap-add SYS_ADMIN \
--security-opt apparmor:unconfined \
--rm -it -v $(pwd):/sqlfs sqlfs
In case this command does not work, use --privileged
flag (see also https://stackoverflow.com/a/49021109)
$ apt-get install sqlite3 sqlite3-pcre
Set up FUSE:
$ apt-get install fuse libfuse-dev
# Make sure fuse.conf has allow_root and user_allow_other set:
$ cat /etc/fuse.conf
allow_root
user_allow_other
Test the system:
mkdir /tmp/test
RUST_LOG=trace cargo run --bin fuse /tmp/test
Unmount:
$ umount /tmp/test
Installing filebench (https://github.com/filebench/filebench):
sudo apt-get install bison flex
git clone https://github.com/filebench/filebench.git
libtoolize
aclocal
autoheader
automake --add-missing
autoconf
./configure
make
Running a benchmark:
mkdir -p /tmp/fbtest
cargo run --release --bin fuse -- /tmp/fbtest/ &
sudo sh -c "echo 0 > /proc/sys/kernel/randomize_va_space"
./filebench -f randomrw.f
umount /tmp/fbtest