tgt backend driver for GlusterFS
Hi all,
I've created a new backend driver for GlusterFS [1] based off bs_rbd.c and bs_rdwr.c. I think the job of making it work for Gluster was very similar to what was done for Ceph. Mostly, the Posix API calls were replaced with equivalents from Gluster's library ("libgfapi"). As in bs_rbd.c, the calls are synchronous.. so each thread blocks waiting for IO completion. At some point in the future I may get asynchronous IO working well enough and will share that.. Gluster's libgfapi does support asynchronous interfaces.
When you create a LUN, specify the --bstype as glfs. The backing-store is "volume@server:image". You can optionally specify a log file using --bsopts.
For example:
tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --bstype glfs --lun 2 --backing-store="vol@myserver:mydisk"
The code for the driver is at:
https://forge.gluster.org/gfapi-module-for-linux-target-driver- and it was forked from http://github.com/fujita/tgt
[1] Gluster (www.gluster.org) is a distributed file system. It can support block device access using the Linux target driver and a Gluster file as the back-end. A little more background may be found in a writeup here - https://www.gluster.org/category/iscsi/
Thanks!
Dan Lambright
+++ b/doc/README.glfs
@@ -0,0 +1,15 @@
+The 'glfs' backing-store driver provides block access to a file within +the gluster distributed file system. The file represents the +storage for the "block device" exported by the driver.
+
+To use it, select --bstype glfs , and set --backing-store to the form:
+
+ volume@hostname:filename
+
+For example, if the volume name was vol1 , and the host gprfs010, and file +name was "disk1", you would set --backing-store to: vol1@gprfs010:disk1. +
+
+
+
+
usr/Makefile +4 -0
@@ -13,6 +13,10 @@ TGTD_OBJS += $(addprefix iscsi/, conn.o param.o session.o \ iscsid.o target.o chap.o sha1.o md5.o transport.o iscsi_tcp.o \ isns.o) +ifneq ($(GLFS_RBD),) +MODULES += bs_glfs.so +endif + ifneq ($(CEPH_RBD),) MODULES += bs_rbd.so endif
usr/bs_glfs.c new file +562 -0
562 lines not on this page · raw message
Hi,
Quoted 2 lines · On Mon, 3 Mar 2014 06:33:42 -0500 (EST) Dan Lambright <[email protected]>…
I've created a new backend driver for GlusterFS [1] based off
bs_rbd.candbs_rdwr.c. I think
Sounds great. I'm very happy to merge your patch if you submit the patch in the following way:
https://www.kernel.org/doc/Documentation/SubmittingPatches
In short,
1. please your patch with your Signed-off-by.
2. please verify your patch with tgt/scripts/checkpatch.pl (your patch has several coding style problems).
Thanks!