thomas-krenn / TKperf

Performance test tool for SSDs, HDDs and RAID devices
https://www.thomas-krenn.com/en/wiki/TKperf
GNU General Public License v3.0
48 stars 23 forks source link

Cannot use ZFS ZVOL #34

Open flotpg opened 4 years ago

flotpg commented 4 years ago

Hey,

as the warning is very clear ;) I thought it would be possible to use a zvol as I didn't find any option to use a file to test (like you do with fio) "!!!Attention!!! All data on /dev/sdXXX will be lost!"

Is it possible to use zvol?

➜ TKperf git:(master) ✗ sudo tkperf hdd tank /dev/zvol/tank/tkperf-zvol -nj 2 -iod 16 -rfb You are not using a valid device or partition!

onitake commented 4 years ago

The relevant code is here: https://github.com/thomas-krenn/TKperf/blob/master/src/perfTest/Devices.py#L233-L248 To make the test succeed, the device needs to be listed in /proc/partitions.

That being said, I think you can also use the --force_test parameter to disable the sanity checks.

Perhaps it may also be a good idea to add a dedicated ZVol driver, like there is for Linux md RAID and LSI controllers.

flotpg commented 4 years ago

Hey @onitake, I will give that a try, thx.

gschoenberger commented 4 years ago

THX for your comments! If we implement a dedicated ZVol device to test, we need commands to:

flotpg commented 4 years ago

You could grep the output of 'zfs mount' which lists currently mounted datasets, not sure how to tell with zvols. I don't know secure erase commands except of creating an encrypted one from the beginning. zfs get all tank/tkperf-zvol lists you all infos about the zvol