2023-07-26 19:33:00 +00:00
2023-05-18 15:29:41 +00:00
2023-07-26 19:33:00 +00:00
2023-07-26 19:21:24 +00:00
2023-07-26 11:46:24 +00:00
2023-01-26 23:20:58 +00:00
2023-07-04 19:37:19 +00:00
2023-07-21 13:47:16 +01:00

EggsFS

A distributed file system. No high level description yet apart from a somewhat outdated proposal. If you have questions you're probably better off asking @fmazzol.

EggsFS is a collection of binaries starting with eggs, plus a kernel module, eggsfs.ko. Specifically:

  • eggsshard and eggscdc, are the processes storing the metadata (what directories and files are on the filesystem);
  • eggsblocks reads and writes blobs of data (blocks), of which files are made of;
  • eggsshuckle acts a nameserver of sorts storing where the shards, CDC, and block services are;
  • eggsgc continuously scans the filesystem for garbage that can be collected;
  • eggscli is a command line tool to interact with the filesystem directly, and also perform some maintenance tasks (e.g. migrating the contents of a block service);
  • eggsfuse is an EggsFS client implemented with fuse;
  • eggsfs.ko is an EggsFS client implemented as a kernel module;
  • eggsrun is a tool to quickly spin up an EggsFS instance;
  • eggstests runs some integration tests.

eggsshard and eggscdc are written in C++. eggsfs.ko is written in C (duh). Everything else is written in Go.

Building

% ./build.sh alpine

Will build all the artifacts apart from the Kernel module. The output will be in build/alpine. Things will be built in an Alpine Linux container, so that everything will be fully statically linked. ./build.sh release will build outside the container, everything will still be linked statically apart from glibc, which cannot be reliably linked statically.

Playing with a local EggsFS instance

% cd go/eggsrun
% go run . -dir <data-dir>

The above will run all the processes needed to run EggsFS. This includes:

  • 256 metadata shards;
  • 1 cross directory coordinator (CDC)
  • A bunch of block services (this is tunable with the -flash-block-services, -hdd-block-services, and -failure-domains flags)
  • 1 shuckle instance

A multitude of directories to persist the whole thing will appear in <data-dir>. The filesystem will also be mounted using FUSE under <data-dir>/fuse/mnt.

Building the Kernel module

% cd kmod
% ./fetchlinux.sh # fetch linux sources
% (cd linux && make oldconfig && make prepare && make -j) # build Linux
% make KDIR=linux -j kmod

Playing with the Kernel module

There's infrastructure to spin up a minimal QEMU image with eggsfs.ko inserted, see kmod/restartsession.sh.

Description
No description provided
Readme 17 MiB
Languages
C++ 44.5%
Go 27.9%
C 24.9%
JavaScript 0.8%
Python 0.6%
Other 1.2%