-
Notifications
You must be signed in to change notification settings - Fork 0
File system data integrity tests
License
bsbernd/ql-fstest
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This program is to check a filesystem for data-integrity. Example: fstest -p 99 /mnt/my-test-filesystem/ >fstest.out 2>fstest.err You should redirect stdout and stderr into different files, as fstest writes stats about the number of written and read files minutely to stdout. You might easily miss critical errors written to stderr, if both streams are directed into the same file. What is ql-fstest doing: It consists of two threads, a writer and a reader. The writer thread writes random numbers as pattern to files. The filename (using the number converted to hex) corresponds to that pattern. Initially the reader thread stays a few files behind the writer thread and checks if the pattern is correct. In order to avoid cache effects, we use posix_fadvise() and try to tell the kernel to remove data from the page cache once the file was written. (Same applies for reads). Additionally the reader is a few files behind the writer, which should make sure, the cache is filled with other data, if the kernel should ignore the posix_fadvise() command. Once the filesystem filled up to the maximum given level, the writer thread will start to delete files in order to write new data. But before it deletes a file, it will itself again check if the file still has correct data (unless the file was already checked 10 times by the reader thread before). As the writer thread now does reads and writes itself, the reader quickly catches up and in order to give it some work, the reader thread will restart to read files from index 0 once it has read the last file written before the filesystem was full. Note: In error case it continues to check remaining files by default and does not terminate.
About
File system data integrity tests
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published