BcacheFS-gym is tool to exercise the Linux BcacheFS filesystem, without using local storage.
- First build it using Go 1.20 or newer:
$ git clone https://github.com/dblueman/bcachefs-gym $ cd bcachefs-gym $ go install
- Launch it as root:
$ sudo ./bcachefs-gym
- BcacheFS-gym loads the brd block-ramdisk kernel module to create in-memory block devices
- It runs the bcachefs userspace utility to format a number of block ram devices, randomising format options with constraints
- The block devices are mounted using randomised mount options, constrained
- A short fio workload is launched with direct and pagecache IO
- Background bcachefs maintenance commands are launched at regular intervals
- Once the workload completes, the filesystem is unmounted and the process repeats
- At any point, if there are errors (non-zero exit code), execution is stopped for analysis