Skip to content

Conversation

Daniel15
Copy link
Contributor

@Daniel15 Daniel15 commented Dec 3, 2023

These messages appear every time YABS is ran on a ZFS partition:

tail: cannot open '2' for reading: No such file or directory

Warning! You are running YABS on a ZFS Filesystem and your disk space is too low for the fio test. Your test results will be inaccurate. You need at least 48 GB free in order to complete this test accurately. For more information, please see https://github.com/masonr/yet-another-bench-script/issues/13

This is because of a typo in the command that gets the free space suffix ("T" for terabyte or "G" for gigabyte). size_b was always an empty string, which meant it failed the if checks on line 535 and 542, which meant it always showed the warning (line 547).

The fix was pretty simple.

For this particular tail call, both tail -c2 and tail -c -2 are valid... I'm not sure what the original author intended. cc @webdock-io (#20).

It could probably be implemented in a cleaner way by using awk for the entire thing instead of a mixture of grep, awk and tail.

There was a typo in the `tail` command.
@masonr masonr merged commit c2ccbc2 into masonr:master Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants