https://github.com/danluu/fs-errors
Reproducing resuts from old papers on modern filesystems
https://github.com/danluu/fs-errors
Last synced: over 1 year ago
JSON representation
Reproducing resuts from old papers on modern filesystems
- Host: GitHub
- URL: https://github.com/danluu/fs-errors
- Owner: danluu
- Created: 2017-10-02T22:15:55.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-26T02:59:59.000Z (over 8 years ago)
- Last Synced: 2025-04-04T19:53:06.418Z (over 1 year ago)
- Language: Python
- Homepage: https://danluu.com/filesystem-errors/
- Size: 147 KB
- Stars: 22
- Watchers: 3
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fs-errors
This repo contains tooling for injecting errors into filesystems using device-mapper.
To run:
~~~
make all
sudo python3 main.py
~~~
## Making files
~~~
dd if=/dev/zero of=filesystem.img bs=1M count=1
mkfs. filesystem.img
~~~
## Installation
~~~
sudo apt install dmsetup
~~~
Requires btrfs and exfat drivers to be installed.
## Notes to self
Procedure to get error offset:
Each filesystem contains `test.txt`. `test.txt` contains Lorem ipsum text (see images/text.txt).
In the case of the -largefile images, `test.txt` contains the letters of the alphabet repeated enough to make 8K of text. See `images/large_test.txt`.
To find the error offset for a new filesystem, you can open the file up in a hex editor, find the byte offset, and divide the byte offset by 512.
This error injection mechanism seems similar or possibly equivalent to the mechanism used in the IRON file systems paper.
md5sum correctly returns an error code of 1 if the file is corrupt in btrfs (and prints md5sum: /mnt/test/test.txt: Input/output error).