[Gluster-users] glusterfs expose iSCSI

Prasanna Kalever pkalever at redhat.com
Wed Sep 13 11:34:33 UTC 2017


On Wed, Sep 13, 2017 at 1:03 PM, GiangCoi Mr <ltrgiang86 at gmail.com> wrote:
> Hi all
>

Hi GiangCoi,

The Good news is that now we have gluster-block [1] which will help
you configure block storage using gluster very easy.
gluster-block will take care of all the targetcli and tcmu-runner
configuration for you, all you need as a pre-requisite is a gluster
volume.

And the sad part is we haven't tested gluster-block on centos, but
just source compile should work IMO.

> I want to configure glusterfs to expose iSCSI target. I followed this
> artical
> https://pkalever.wordpress.com/2016/06/23/gluster-solution-for-non-shared-persistent-storage-in-docker-container/
> but when I install tcmu-runner. It doesn't work.

What is your environment, do you want to setup guster block storage in
a container environment or is it just in a non-container centos
environment ?

>
> I setup on CentOS7 and installed tcmu-runner by rpm. When I run targetcli,
> it not show user:glfs and user:gcow
>
> /> ls
> o- / ...................................................... [...]
>   o- backstores ........................................... [...]
>   | o- block ............................... [Storage Objects: 0]
>   | o- fileio .............................. [Storage Objects: 0]
>   | o- pscsi ............................... [Storage Objects: 0]
>   | o- ramdisk ............................. [Storage Objects: 0]
>   o- iscsi ......................................... [Targets: 0]
>   o- loopback ...................................... [Targets: 0]
>

BTW - have you started your tcmu-runner.service ?
If your tcmu-runner service is running but you still cannot see them
listed in the 'targetcli ls' output, then it looks like your handlers
were not loaded properly.

In fedora, the default handler location will be at /usr/lib64/tcmu-runner

[0] ॐ 04:55:22@~ $ ls /usr/lib64/tcmu-runner/
handler_glfs.so

Just try using --handler-path option
[0] ॐ 04:56:05@~ $ tcmu-runner --handler-path /usr/lib64/tcmu-runner/ &

[0] ॐ 05:00:54@~ $ targetcli ls | grep glfs
  | o- user:glfs
..............................................................................................
[Storage Objects: 0]

If it works, then may be you can tweak the systemd unit, in case if
you want to run it as a service

> How I configure glusterfs to expose iSCSI. Please help me.

Feel free to parse gluster-block ReadMe [2]


[1] https://github.com/gluster/gluster-block
[2] https://github.com/gluster/gluster-block/blob/master/README.md

Cheers!
--
Prasanna

>
> Regards,
>
> Giang
>
>
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://lists.gluster.org/mailman/listinfo/gluster-users


More information about the Gluster-users mailing list