I'm trying to test my device using the tool fio in Linux server, first my file system was not full. So I test the first file which I prepared before and get an error, then when I want to change some parameters with vi, it tells me that the file system is full, I don't understand why and how I can empty the file without destruction? Than you for your answers.
It's difficult to answer this type of question without the jobfile and parameters fio was run with - see the REPORTING-BUGS file fio comes with for the sort of information people need to diagnose this type of problem.
Hint 1: Sometimes people don't realize that if they don't specify a filename explicitly for a job that fio will make up a filename for a file in the current working directory based off the name of the job. If the job has a size fio will try and make the file of that size in the current working directory unless told to do otherwise.
Hint 2: When choosing a filename of a raw disk device people typo it (filename=/dev/seg
). Again if size is set this causes fio to try and create a file called /dev/seg
inside /dev/
and since the /dev/
filesystem on Linux is itself is quite small all the space inside it is quickly filled up with a new file.
If you know the file you want fio to work on should already exist and fio should not make it then one way to prevent this situation is to use allow_file_create=0
to turn file creation into an error.
If you're already in the case where fio has made these extra files your only way out is to carefully delete them. When trying to delete files made in /dev/
extra care should be taken to ensure you aren't deleting a real block device node (e.g. use stat on path to check that it's a plain file before removing it etc).