linux target driver (tgt) throws an IO error when specifying block storage type (bstype) glusterfs

0

I am trying to use glusterfs and tgt to create (iscis over glusterfs infrastructure). In the glusterfs documentation, they mentioned that using the libgfapi, the datapath skips FUSE. I installed tgt (with glusterfs support). I created a target:

./tgtadm --lld iscsi --op new --mode target --tid 1 -T iqn.20013-10.com.redhat

then I added a logical unit to the target

./tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 --bstype="glfs" --backing-store="sp_volume@localhost:disk01.img" 

when showing the target everything looks fine:

Target 1: iqn.20013-10.com.redhat
System information:
    Driver: iscsi
    State: ready
I_T nexus information:
LUN information:
    LUN: 0
        Type: controller
        SCSI ID: IET     00010000
        SCSI SN: beaf10
        Size: 0 MB, Block size: 1
        Online: Yes
        Removable media: No
        Prevent removal: No
        Readonly: No
        SWP: No
        Thin-provisioning: No
        Backing store type: null
        Backing store path: None
        Backing store flags: 
    LUN: 1
        Type: disk
        SCSI ID: IET     00010001
        SCSI SN: beaf11
        Size: 10000 MB, Block size: 512
        Online: Yes
        Removable media: No
        Prevent removal: No
        Readonly: No
        SWP: No
        Thin-provisioning: No
        Backing store type: glfs
        Backing store path: sp_volume@localhost:disk01.img
        Backing store flags: 
Account information:
ACL information:
    ALL

The problem is that when a client login to that target and tries to mount it or create a partition on it an error fdisk: cannot open /dev/sdc: Input/output error

On the server-side the tgtd shows:

tgtd: bs_glfs_request(279) Error on read ffffffff 400tgtd: 
bs_glfs_request(370) io error 0x55b2178ef970 2 28 -1 1024 0, Invalid 
argument
tgtd: bs_glfs_request(279) Error on read ffffffff 400tgtd: 
bs_glfs_request(370) io error 0x55b2178efc30 2 28 -1 1024 1024, 
Invalid argument
tgtd: bs_glfs_request(279) Error on read ffffffff 400tgtd: 
bs_glfs_request(370) io error 0x55b2178efef0 2 28 -1 1024 2048, 
Invalid argument

Any ideas on how to fix that?

Yassine Fadhlaoui

Posted 2019-09-11T12:36:09.137

Reputation: 21

No answers