summaryrefslogtreecommitdiff
path: root/examples/nbd.fio
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2019-08-02 17:11:25 +0100
committerJens Axboe <axboe@kernel.dk>2019-08-02 10:41:24 -0600
commitd643a1e29d31bf974a613866819dde241c928b6d (patch)
treec255cb40df40dd355601baa658baae45fc6c5055 /examples/nbd.fio
parent66b182f90c3f08dcbd0592ce70cb350ca5ac0cc0 (diff)
downloadfio-d643a1e29d31bf974a613866819dde241c928b6d.tar.gz
fio-d643a1e29d31bf974a613866819dde241c928b6d.tar.bz2
engines: Add Network Block Device (NBD) support using libnbd.
This commit adds a new engine for testing Network Block Devices directly. It requires libnbd (https://github.com/libguestfs/libnbd). To see how to test nbdkit or qemu-nbd read examples/nbd.fio. Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'examples/nbd.fio')
-rw-r--r--examples/nbd.fio35
1 files changed, 35 insertions, 0 deletions
diff --git a/examples/nbd.fio b/examples/nbd.fio
new file mode 100644
index 00000000..27e15086
--- /dev/null
+++ b/examples/nbd.fio
@@ -0,0 +1,35 @@
+# To use fio to test nbdkit:
+#
+# nbdkit -U - memory size=256M --run 'export unixsocket; fio examples/nbd.fio'
+#
+# To use fio to test qemu-nbd:
+#
+# rm -f /tmp/disk.img /tmp/socket
+# truncate -s 256M /tmp/disk.img
+# export unixsocket=/tmp/socket
+# qemu-nbd -t -k $unixsocket -f raw /tmp/disk.img &
+# fio examples/nbd.fio
+# killall qemu-nbd
+
+[global]
+ioengine=nbd
+uri=nbd+unix:///?socket=${unixsocket}
+# Starting from nbdkit 1.14 the following will work:
+#uri=${uri}
+rw=randrw
+time_based
+runtime=60
+group_reporting
+iodepth=64
+
+[job0]
+offset=0
+
+[job1]
+offset=064m
+
+[job2]
+offset=128m
+
+[job3]
+offset=192m