forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create fio plugin for cstor replica (openzfs#42)
- Loading branch information
Jan Kryl
committed
Jun 26, 2018
1 parent
0daccaf
commit 06126ac
Showing
11 changed files
with
912 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
AC_DEFUN([ZFS_AC_CONFIG_USER_FIO], [ | ||
AC_ARG_WITH(fio, | ||
[AC_HELP_STRING([--with-fio=dir], | ||
[build with FIO engine for replica protocol])], | ||
[AC_CHECK_FILE($withval/fio.h, | ||
[FIO_SRCDIR=$withval], | ||
[AC_MSG_FAILURE([Not a valid fio repository])])]) | ||
]) | ||
|
||
AC_SUBST([FIO_SRCDIR]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
include $(top_srcdir)/config/Rules.am | ||
|
||
DEFAULT_INCLUDES += \ | ||
-I$(top_srcdir)/include \ | ||
-I$(FIO_SRCDIR) | ||
|
||
lib_LTLIBRARIES = replica.la | ||
|
||
replica_la_SOURCES = replica.c | ||
replica_la_LDFLAGS = -module | ||
# required for fio external plugins on linux | ||
replica_la_CFLAGS = -D_GNU_SOURCE -DCONFIG_STRSEP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
This is a fio engine for zfs replica using replica network protocol to | ||
configure data connections and issue IOs over them. | ||
|
||
# Build | ||
|
||
Use `--with-fio=DIR` in addition to `--enable-uzfs` configure option to | ||
enable building it. `DIR` is a path to fio repository with fio include | ||
files. | ||
|
||
# Run | ||
|
||
We assume that fio command is executed from the fio's repository directory. | ||
In following command change path to zfs repository as appropriate: | ||
|
||
```bash | ||
LD_LIBRARY_PATH=/repos/zfs/lib/fio/.libs ./fio replica.fio | ||
``` | ||
|
||
fio should get stuck and print a message `waiting for connection from replica`. | ||
In another window start zfs replica and instruct it to connect to "fio | ||
target" which is listening on loopback interface: | ||
|
||
```bash | ||
sudo /repos/zfs/cmd/zrepl/zrepl 127.0.0.1 | ||
``` | ||
|
||
At most after 5 secs `zrepl` will connect to fio and IO will start flowing. | ||
`address` and `port` replica fio engine configuration options can be used | ||
to avoid the listening phase and create data connection directly from fio | ||
engine to zfs replica. |
Oops, something went wrong.