UNRELIABLEFS(1) General Commands Manual UNRELIABLEFS(1)

unreliablefsa FUSE-based fault-injecting filesystem

unreliablefs mountpoint [-basedir path] [-seed number] [-hvdf]

The unreliablefs is a filesystem that allows to inject errors on file operations. Without configuration it works as pass-through filesystem and redirects file operations to a file objects on a real filesystem.

unreliablefs uses Filesystem in Userspace (FUSE) that allows easy setup without requiring a kernel recompile or new kernel modules. Without any other configuration, any files in a mounted directory will be available unchanged. To mount filesystem it is required to specify mountpoint and after mount it will contain the same file tree as a root filesystem.

The options are as follows:

path
Specify path to a directory that should be mount.
number
Specify a seed.
Do not daemonize.
Do not daemonize. If this option is specified, unreliablefs will run in the foreground and log to .
Show version.
Show usage.

Supported file operations are: access(2), chmod(2), chown(2), creat(2), fallocate(2), flock(2), fsync(2), ftruncate(2), getxattr(2), ioctl(2), link(2), listxattr(2), lock(2), lstat(2), mkdir(2), mknod(2), open(2), read(2), readdir(2), readlink(2), removexattr(2), rename(2), rmdir(2), setxattr(2), statfs(2), symlink(2), truncate(2), unlink(2), utimensat(2), write(2).

Following functions are unsupported on OpenBSD: removexattr(2), setxattr(2), getxattr(2), listxattr(2), flock(2), fallocate(2).

The unreliablefs utility exits 0 on success, and >0 if an error occurs.

$ mkdir /tmp/fs
$ unreliablefs /tmp/fs -basedir=/tmp -seed=1618680646
$ cat << EOF > /tmp/fs/unreliablefs.conf
[errinj_noop]
op_regexp = .*
path_regexp = .*
probability = 30
EOF
$ ls -la
$ umount /tmp/fs

fusermount(1), errno(2), fuse(4), unreliablefs.conf(5), fuse(8), mount.fuse(8)

Anthony Rebello, Yuvraj Patel, Ramnatthan Alagappan, Andrea C. Arpaci-Dusseau, and Remzi H. Arpaci-Dusseau, Can Applications Recover from fsync Failures?, University of Wisconsin - Madison, https://www.usenix.org/conference/atc20/presentation/rebello.

Thanumalayan Sankaranarayana Pillai, Vijay Chidambaram, Ramnatthan Alagappan, Samer Al-Kiswany, Andrea C. Arpaci-Dusseau, and Remzi H. Arpaci-Dusseau, All File Systems Are Not Created Equal: On the Complexity of Crafting Crash-Consistent Applications, University of Wisconsin - Madison, https://www.usenix.org/conference/osdi14/technical-sessions/presentation/pillai.

Maha Kooli and Giorgio Di Natale, A survey on simulation-based fault injection tools for complex systems.

Dan Luu, Files are hard.

Bharath Kumar Reddy Vangoor, Vasily Tarasov, and Erez Zadok, To FUSE or Not to FUSE: Performance of User-Space File Systems, Stony Brook University, IBM Research-Almaden, https://www.usenix.org/conference/fast17/technical-sessions/presentation/vangoor.

Aditya Rajgarhia and Ashish Gehani, Performance and Extension of User Space File Systems, Georgia Institute of Technology, https://www.usenix.org/conference/atc19/presentation/bijlani.

The unreliablefs utility was written by Sergey Bronnikov.

Faults can be injected before a start of a file operation, and cannot be injected say in a middle of file operation. So if a file operation has been successfully started then unreliablefs will not affect it and final result entirely depends on a base filesystem and application that started file operation.

November 3, 2020 Debian