[Gluster-devel] iSCSI

Prasanna Kalever pkalever at redhat.com
Fri Jul 8 12:13:20 UTC 2016


Hi Francis,


The tcmu-runner is not available as a pre built package in Ubuntu distro,
so you need to build it on your own, honestly I have not tried this on my
own but the suggested solution should solve it for you.

glfs is supported from initial version of tcmu-runner, so you can take up
any latest version of it.

perform cmake . -Dwith-glfs=true followed by make

that's not all, you need to manually copy the systemd unit files
(tcmu-runner.sevice) the respective directives and copy the handlers (in
our case 'handler_glfs.so' to /usr/lib/tcmu-runner/) and other required
conf files


take a look at the fedora rpm spec, which should be a way to follow
[...]
%install

make install DESTDIR=%{buildroot}

mkdir -p %{buildroot}%{_mandir}/man8/

install -m 644 tcmu-runner.8.gz %{buildroot}%{_mandir}/man8/



%post -n libtcmu -p /sbin/ldconfig



%postun -n libtcmu -p /sbin/ldconfig



%files

%{_bindir}/tcmu-runner

%dir %{_libdir}/tcmu-runner

%{_libdir}/tcmu-runner/*

%{_sysconfdir}/dbus-1/system.d/tcmu-runner.conf

%{_datarootdir}/dbus-1/system-services/org.kernel.TCMUService1.service

%{_unitdir}/tcmu-runner.service

%doc README.md

%license LICENSE

%{_mandir}/man8/tcmu-runner.8.gz





%files -n libtcmu

%{_libdir}/*.so.*



%files -n libtcmu-devel

%{_includedir}/libtcmu.h

%{_includedir}/libtcmu_common.h

%{_libdir}/*.so
[...]


list of things you need to do:
1. do the path changes in the systemd unit file tcmu-runner.service and
copy it to /lib/systemd/system/
2. copy the libraries to respective paths
3. mkdir and copy handler_glfs.so to /usr/lib/tcmu-runner
4. copy the tcmu-runner.conf   to /etc/dbus-1/system.d/
5. copy org.kernel.TCMUService1.service to /etc/dbus-1/system-services/
6. make sure target_core_user is loaded and target.service is running
7. run systemctl start tcmu-runner.servie

Hopefully that should work!

Looking forward for your update.

Cheers,
--
Prasanna

On Fri, Jul 8, 2016 at 3:51 AM, francis Lavalliere <
francis.lavalliere at gmail.com> wrote:

> Hello,
>
> I've been messing around with Gluster FS version 3.7 and 3.8.
>
> Currently i am trying to implement iSCSI with Gluster FS.
>
> I've installed ubuntu 16.04 and have installed various components:
>
> I didnt found any tcmu-runner packages for ubuntu, so i manually built it
> using their git repository:
>
> I've tried : cmake . -Dwith-glfs=true  and successfully installed it using
> make/make install..
>
> when I do : targetcli ls  i do not see the output of the user:glfs
>
>
> Here is an example of the output. I've managed to do it via fileio, but
> this is not the right way.
>
> targetcli ls
>
> o- */*
> .........................................................................................................................*
> [*...*]*
>
>   o- *backstores*
> ..............................................................................................................*
> [*...*]*
>
>   | o- *fileio*
> ...................................................................................................*
> [*1 Storage Object*]*
>
>   | | o- *testfs*
> ..................................................................................*
> [*711.0M, /nfs/testfs.img, in use*]*
>
>   | o- *iblock*
> ...................................................................................................*
> [*0 Storage Object*]*
>
>   | o- *pscsi*
> ....................................................................................................*
> [*0 Storage Object*]*
>
>   | o- *rd_mcp*
> ...................................................................................................*
> [*0 Storage Object*]*
>
>   o- *ib_srpt*
> ...........................................................................................................*
> [*0 Targets*]*
>
>   o- *iscsi*
> ..............................................................................................................*
> [*1 Target*]*
>
>   | o- *iqn.2015-04.com.example:target1*
> .....................................................................................*
> [*1 TPG*]*
>
>   |   o- *tpg1*
> ............................................................................................................*
> [*enabled*]*
>
>   |     o- *acls*
> ...........................................................................................................*
> [*0 ACLs*]*
>
>   |     o- *luns*
> ............................................................................................................*
> [*1 LUN*]*
>
>   |     | o- *lun0*
> ................................................................................*
> [*fileio/testfs (/nfs/testfs.img)*]*
>
>   |     o- *portals*
> ......................................................................................................*
> [*1 Portal*]*
>
>   |       o- *0.0.0.0:3260 <http://0.0.0.0:3260>*
> .......................................................................................*
> [*OK, iser enabled*]*
>
>   o- *loopback*
> ..........................................................................................................*
> [*0 Targets*]*
>
>   o- *qla2xxx*
> ...........................................................................................................*
> [*0 Targets*]*
>
>   o- *tcm_fc*
> ............................................................................................................*
> [*0 Targets*]*
>
>   o- *usb_gadget*
> ........................................................................................................*
> [*0 Targets*]*
>
>   o- *vhost*
> .............................................................................................................*
> [*0 Targets*]*
>
>
> Anyone would know how to make iSCSI target user:glfs show in the targetcli
> to be compatible with GlusterFS Directly?
>
>
> Thank you.
>
>
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> http://www.gluster.org/mailman/listinfo/gluster-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gluster.org/pipermail/gluster-devel/attachments/20160708/7d5625dc/attachment-0001.html>


More information about the Gluster-devel mailing list