JonMagon / KDiskMark

A simple open-source disk benchmark tool for Linux distros
GNU General Public License v3.0
1.07k stars 43 forks source link

"Destroys data" #94

Closed sezanzeb closed 1 year ago

sezanzeb commented 2 years ago

The prompt says "This action destroys the data in ⁠/⁠mnt⁠/⁠data⁠/⁠.kdiskmark.tmp Do you want to continue?"

I guess this obviously means that kdiskmark will write to ⁠/⁠mnt⁠/⁠data⁠/⁠.kdiskmark.tmp, which would destroy that file if it existed.

A prompt that says that it will destroy something looks really dangerous at first to me. But this is safe to use and it won't harm any of my existing files, right?

If so, is that prompt really necessary? Maybe it should only be shown if that file exists already.

JonMagon commented 2 years ago

Hi. I stick to the idea of explaining everything that happens next. I may not be able to do it everywhere, but still. Even if the file does not exist, I would like the user to know that this file will be created and where, and the storage will not be used in raw mode. The message may sound threatening, but that's exactly what's going to happen.

WojtasJD commented 2 years ago

Maybe "This action erases the data in ⁠/⁠mnt⁠/⁠data⁠/⁠.kdiskmark.tmp file. Do you want to continue?" or "This action creates test file ⁠/⁠mnt⁠/⁠data⁠/⁠.kdiskmark.tmp. Do you want to continue?" will be less scary.

"file", beacuse in this article: https://linuxhint.com/benchmark-storage-drives-in-linux-with-kdiskmark/

Beware that these benchmarks will completely erase contents of the selected directory, so choose a folder where you have no data stored.

(I've just wrote an email to them about it) (nevermind - they've removed wrong sentence)

GrafVishna commented 1 year ago

My GPT partitioning was damaged after the test, the main record was damaged. I had to restore from a backup entry.

JonMagon commented 1 year ago

My GPT partitioning was damaged after the test, the main record was damaged. I had to restore from a backup entry.

This could not happen because benchmarking is not done for raw device, but using the filesystem. Although it may be a specific system configuration or malformed package, it is worth opening a new issue and describing the problem in as much detail as possible.

GrafVishna commented 1 year ago

I apologize for the false information!!!( The reason was something else, due to my inattention! Benchmark is not to blame, the Program works fine!!! Thank you for your hard work!!!!

dynobo commented 1 year ago

Came here, too, because I was scared by the wording of this message and googled before proceeding. While I appreciate the openness and directness to inform the user about what is happening, the choice of words actually leaves it quite unclear and was more confusing than helpful to me.

Another alternative version: "This action creates a temporary file ⁠/⁠mnt⁠/⁠data⁠/⁠.kdiskmark.tmp. If this file already exists, it will be deleted. Do you want to continue?"

In general, I think it would be even better if you could check upfront, if this file already exists, and then throw an even more explicit warning like: "The file ⁠/⁠mnt⁠/⁠data⁠/⁠.kdiskmark.tmp already exists! Do you want to overwrite it? This will delete its data!"

I don't think it would be necessary, but you still could show a more neutral message on every run, like "This action creates a test file ⁠/⁠mnt⁠/⁠data⁠/⁠.kdiskmark.tmp and deletes it after the benchmark. Do you want to continue?"

BTW: Thanks for this great tool! :-)