Skip to content

Instantly share code, notes, and snippets.

@sgzerolc
Created October 7, 2022 07:09
Show Gist options
  • Save sgzerolc/c61fdd9d79459fc04084b3382e3cfbb2 to your computer and use it in GitHub Desktop.
Save sgzerolc/c61fdd9d79459fc04084b3382e3cfbb2 to your computer and use it in GitHub Desktop.
zenfs build and install
# Today, zns occurs to me so I decide to install zenfs to see how it fits into rocksdb. Environment setting up can always be tedious and ugly. So list a summary here:
# rocksdb only
https://blog.csdn.net/u013171226/article/details/110167997
make static_lib
make install-static PREFIX=/usr/local/rocksdb
# rocksdb + zenfs
// then must add to bashrc(needed for both)
// (Or you may meet errors: undefined reference to `google::FlagRegisterer: rocksdb...
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/rocksdb/lib
export PKG_CONFIG_PATH=/usr/local/lib
https://github.com/westerndigitalcorporation/zenfs
// I met several problems related to linking shared libraries of glib. Found a good solution searching for a while. The basic idea is to add /usr/local/lib to conf......
https://hyunyoung2.github.io/2016-04-07-While_Loading_Shared_Libraries,_error_Cannot_Open_Shared_Object_File
// use null_blk as ex
modprobe null_blk nr_device=1 zoned=1
echo deadline > /sys/class/block/nullb0/queue/scheduler
./plugin/zenfs/util/zenfs mkfs --zbd=nullb0 --aux_path=plugin/zenfs/log
// hit an EIO again. Come back later :)
./db_bench --fs_uri=zenfs://dev:nullb0 --benchmarks=fillrandom --use_direct_io_for_flush_and_compaction
Failed creating env: Invalid argument: IO error: No such file or directory: While mkdir if missing: /plugin/zenfs/log/: No such file or directory: zenfs://dev:nullb0
// tip: when something goes wrong and then changes some configs, better to make clean after remake.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment