https://github.com/zperf/fusestream
A simple tool for file system and block device fault injection tests
https://github.com/zperf/fusestream
Last synced: 5 months ago
JSON representation
A simple tool for file system and block device fault injection tests
- Host: GitHub
- URL: https://github.com/zperf/fusestream
- Owner: zperf
- License: mit
- Created: 2025-05-07T11:16:40.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-14T10:32:50.000Z (10 months ago)
- Last Synced: 2025-08-14T12:25:42.473Z (10 months ago)
- Language: Go
- Homepage:
- Size: 152 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FuseStream
A simple tool for file system fault injection tests, inspired by [chaos-mesh/toda](https://github.com/chaos-mesh/toda).
## Compile
### Windows
```bash
$env:CPATH="C:\Program Files (x86)\WinFsp\inc\fuse"
go build main.go
```
### Linux
```bash
go build main.go
```
## Usage
### Environment
```bash
# Start the pprof HTTP server (optional)
export FUSESTREAM_DEBUG="127.0.0.1:6000"
# Export OpenTelemetry spans to parquet
export FUSESTREAM_EXPORT_PATH="/tmp/fs.parquet"
```
### FUSE
```bash
# mount the file system
fusestream fuse mount -b --base-dir /tmp/fusestream --mountpoint /mnt/fusestream
# inject fault
fusestream fuse inject-latency -g 'test-file.*' -p 1 --op CREATE -l 1000ms
# list injected faults
fusestream fault list
# time touch /mnt/fusestream/test-file14
0.00s user 0.00s system 0% cpu 1.002 total
```
## OpCodes
### FUSE
- UNKNOWN
- STATFS
- MKNOD
- MKDIR
- UNLINK
- RMDIR
- LINK
- SYMLINK
- READLINK
- RENAME
- CHMOD
- CHOWN
- UTIMENS
- CREATE
- OPEN
- GETATTR
- TRUNCATE
- READ
- WRITE
- RELEASE
- FSYNC
- OPENDIR
- READDIR
- RELEASEDIR
## Licence
MIT