Specifying Drive letters with fio for Windows.

fio on Windows

Download pre-compiled fio binary for Windows

Example fio windows file, single drive

This will create a 1GB file called fiofile on the F:\ Drive in Windows then read the file.  Notice that the specification is “Driveletter” “Backslash” “Colon” “Filename”

In fio terms we are “escaping” the : which fio traditionally uses as a file separator.

[global]
bs=1024k
size=1G
time_based
runtime=30
rw=read
direct=1
iodepth=8

[job1]
filename=F\:fiofile 
Example fio windows file, multiple drives
[global]
bs=1024k
size=1G
time_based
runtime=30
rw=read
direct=1
iodepth=8
group_reporting

[job1]
filename=F\:fiofile 

[job2]
filename=G\:fiofile 
To use Physical Drives (Not formatted)

Use the format \\.\\PhysicalDrive<N>

Firstly find the correct drive using diskpart -> list disk

DISKPART> list disk

Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 60 GB 0 B
Disk 1 Online 1024 GB 0 B *
Disk 2 Online 1024 GB 0 B *
Disk 3 Online 50 GB 0 B *
Disk 4 Online 50 GB 0 B *
Disk 5 Online 50 GB 0 B *
Disk 6 Online 50 GB 0 B *
Disk 7 Online 600 GB 1024 KB
Disk 8 Online 500 GB 1024 KB
Disk 9 Online 1024 GB 1024 KB
Disk 10 Online 77 GB 1024 KB

Then use the disk number you want in your fio file e.g.

[global]
ioengine=windowsaio
direct=1
time_based
runtime=60s
size=10g

[log]
rw=write
bs=4k
iodepth=1
filename=\\.\PhysicalDrive10

One comment on “Specifying Drive letters with fio for Windows.

Leave a Comment