Rocky Linux ISCSI / FIbre Channel Target Support

Hi Guys,

I’ve tried a lot of Centos alternatives, but still waiting for Rocky Linux .
I’m at an halt for a reason : I’ve searched and i’ve seen that most Centos alternatives are missing the iSCSI Target mode packages, you can’t make an iSCSI disk on the OS by just yum / dnf the package .

I’ve made some succesful tests using Debian, and the tgtd service . On other OS’s i just didn’t get the solution , the only thing you can use is targetcli, in RHEL / CENTOS / alternatives.

Just asking, could someone put this request on the list for the packages ? If i use tgtd service i can use the Webmin module to configure an iSCSI disk, and i would really need this for production usage, this is from my point of view .

If we can include this, to make it easy to install and configure an system for enterprise storage / iSCSI / Fibre Channel target support , this would make lot’s of people happy who are using storage devices / servers for enterprise storage .

Cheers,
Andrei

Hello Andrei,

as Rocky will be a 1-to-1 rebuild, there will be no additional packages.

A SIG could form to support extra packages/devices/architectures, but that’s probably not going to happen anytime soon.

Just curious: Are those packages developed by Red Hat or why are they not available?
If the sources are publicly available, it shouldn’t be too hard to turn them into a nice RPM.

Kind regards,
Steve

Hello smeier,

I don’t know, i’ve tried to do this for my own enterprise storage requirements, i work in an company, and i’m the senior sysadmin. I’m trying to move from OS based storage, to i SCSI disks on bare metal servers, and to serve the iSCSI virtual disk to the Virtual OS that will hold the OS for the samba server, thus having the OS and the data separated, from my point of view it’s more simpler and easier, because in case of some OS problems, or i want to make backups, it’s simpler like this, i just connect another iSCSI disk and i can migrate all the data to that disk .

Cheers,
Andrei

Hey Andrei,

I’ve worked in similar veins in the past for my home labs, as I no longer deal with block storage arrays for iSCSI etc. for my day job. Even though I could get iSCSI block devices exposed via targetcli I chose to use ESOS and just add the Fibre Channel (as I use FC in my home virtual labs). Worked great.

Now that it’s been a few years since I did any of that work or even setup iSCSI. However given that I believe I had it working to provide similar functionality as tgtd. Can you describe where you are “at an halt” maybe we could assist and alleviate the need for additional packages?

I do recall in my first pass having some issues with target discover, initiator auth and/or bringing up the portal. However I believe I had it all working before I moved to ESOS, which was only about having a single interface for configuring each aspect of the storage. I could have stayed on CentOS instead, I just wanted something more UX friendly when building new arrays or making adjustments to existing FC zoning.

Hi illuminatus,

Well the thing is simple : I wanted to make a switch from the LVM OS install , and to keep all my company’s data on a simple and easy to mantain ISCSI disk configuration.

The package scsi-target-utils , is missing from centos repos, and i’ve tried till now the folowing :

Oracle Linux 8.3
Alma Linux - rc candidate
Still waiting for Rocky Linux.

But i didn’t find that package , so that you could easily use the Webmin panel on the server to simply serve the ISCSI Disks via a simple and friendly UX .
I really don’t want to begin thinking of working with targetcli, it’s bothersome for me.
I’ve managed to find in Debian, the tgtd package - which is called in RHEL realm - scsi-target-utils.
On debian I’ve made the tests, and it works flawlessly . I’ve made the Webmin ISCSI disks, and i could serve them via 1 Gbps, 10Gbps, and that’s more than enough .
If there would be support for iSCSI with Fibre Channel , i believe that Rocky Linux, and the Package itself would become the most used package by admins in the world, because you would surely want to make a simple solution, and to have it working quick and easy, by the click of an button in Webmin .

These are my taughts, i know maeby people will laugh, but still, having this in Rocky Linux seems like a win for the community and for IT individuals at large.

Webmin and scsi-target-tools are a blessing for me, from the time i started working in IT .

This could be a good thing, so if somebody can help to make the packages available for Rocky Linux, that would be the perfect combination for an Open Source software and the management point of view .

I’ve tried to take the scsi-target-utils from centos 7 to install it on oracle linux, there were missing dependencies but unfortunately i didn’t make a good job, there is an systemd dependency that’s not ok and i didn’t had succes . Still, if a developer or somebody with skills on this could take a look, for sure people would be glad to work with it and Rocky Linux would become an de facto enterprise storage OS for lots of people .

Hello @puma2001

I have built a scsi-target-utils RPM on CentOS 8 for you.

You can download it here → Gofile

Note: I do not have any iSCSI devices so it’s completely untested and comes with absolutely no guarantees. Try on your own risk on a non-production system.

Let me know if that helps.

Hi @smeier ,

10x a lot, i will give it a try on centos 8 and all other RHEL alternatives.
Will keep you informed of the package status if it’s ok or if doesn’t work .
Also, we could think to make this available in the repo if it’s working properly.

Cheers,
Andrei

So there’s some problems, at least in Alma Linux RC

[root@alma ~]# rpm -i scsi-target-utils-1.0.80-1.x86_64.rpm
file /usr/lib from install of scsi-target-utils-1.0.80-1.x86_64 conflicts with file from package filesystem-3.8-3.el8.x86_64
file /usr/sbin from install of scsi-target-utils-1.0.80-1.x86_64 conflicts with file from package filesystem-3.8-3.el8.x86_64

Yes, that’s an oversight.

I have changed this and rebuild the package.

Please check the download link again, there is a new version there.

checked it, it installs the package, but after the setup and everything it does not want to start iscsi service target. i suspect there’s other dependencies , like from centos family OS, that’s making the service not working, also, it says that there’s no tgtd.service in /etc/init.d , so you can’t start/stop/restart the service. maeby you can take a look at the centos repos, there’s a dependency list there with all the files as far as i saw, but i don’t know how to compile the packages.

https://centos.pkgs.org/7/epel-x86_64/scsi-target-utils-1.0.55-4.el7.x86_64.rpm.html

also these are included as far as i can see :

rovides

Name Value
config(scsi-target-utils) = 1.0.55-4.el7
scsi-target-utils = 1.0.55-4.el7
scsi-target-utils(x86-64) = 1.0.55-4.el7

Ok, I identified some more issues

  • tgt-admin is missing execute permission
  • tgt-admin is missing some Perl modules
  • Postinstall script to register systemd server tgtd is missing

Let me try to fix those. I’ll upload a new RPM when done.

Just uploaded a new build, 4.el8.

Confirmed installation and starting of the services on a fresh install:

  • yum install epel-release
  • yum install scsi-target-utils-1.0.80-4.el8.x86_64.rpm
  • systemctl start tgtd

Let me know if that’s successful on your system, @puma2001

i can confirm that it’s working, at least with the combination of Webmin and command line .

Imgur

and after this i got this ! :slight_smile:

the only thing that’s required right now is to fix the init.d file, so that i can restart via init.d, if it’s ok .

Imgur

Making this work in Webmin and i think we could put this in EPEL and we’d be perfect for Enterprise Storage works, at least from the iSCSI via Ethernet, we would not have the ESOS utilty to export the iSCSI disk via Fibre Channel, but, this is a HUGE step for easy iSCSI on Rocky Linux via Webmin, and not only Rocky Linux, but all RHEL clones.

but this is a small thing, from my part of the plan it works !

If i can make a simple systemctl restart tgtd from console, that’s the best thing ever !
So, even if we don’t have the init.d file, it still works, tested !

I’d like to make a tutorial for the iSCSI disk on RHEL clones, i think the community at large would like that so that we have a good knowledge base .

I need to give you a beer, personally, for this. If we make it all the way, it will save my ass, for years ! :slight_smile:

Hello @puma2001

very happy to see that it works.

As RHEL 8 doesn’t use init.d any more, I don’t think that init script should be in the package.
It’s more like a crutch for Webmin, so it should go into a separate package, if needed.

For a start, try putting this into /etc/init.d/tgtd and see if it resolves the error:

#!/bin/sh

/usr/bin/systemctl ${1} tgtd.service
exit $?

Don’t forget to chmod 755 it.

So, like this is pretty much resolved ! Thanks a lot @smeier !

I’ve just tested it and works, i know that systemctl is the next level in Centos 8, and it’s good, the only thing was that working with this from a perspective of the Webmin Panel you can just restart the service .

So it’s pretty much resolved, i’l make a new machine, and i’l try to remake everything, and to make a tutorial . Still, it’s wierd that i can’t add more pictures to the forum, so in that case i’l make a PDF i think.

Hi everybody, this is for all the people who will need the iSCSI disk in Webmin for easy target administration with Rocky Linux / Alma Linux !

Special thanks to @smeier !

Install scsi-target-utils on Oracle Linux 8.3 / Alma Linux 8.3 – TESTED and CONFIRMED WORKING with the packages.

[root@storage ~]# wget https://srv-store5.gofile.io/download/Z5jGNy/scsi-target-utils-1.0.80-4.el8.x86_64.rpm
[root@storage ~]# yum install lsof perl perl-Config-General
[root@storage ~]# rpm -i scsi-target-utils-1.0.80-4.el8.x86_64.rpm

make a new file named tgtd and copy paste this :

#!/bin/sh

/usr/bin/systemctl {1} tgtd.service** **exit ?

Copy the tgtd file to /etc/init.d and after that make it executable 775

Make the service start at boot with the command below :
chkconfig tgtd on
Start the service :
systemctl start tgtd
to restart the service :
systemctl restart tgtd

for Webmin in Alma Linux do this from the URL : Webmin
For Oracle Linux just install via RPM .

yum -y install perl perl-Net-SSLeay openssl perl-Encode-Detect tar
install it manually with ./setup.sh /usr/local/webmin
after that have fun with your new iSCSI Target Server !

When you create the iSCSI please follow this : please try a targetname without uppercase characters and without any other special characters: “Uppercase characters are always mapped to lowercase characters.”
Keep the server hostname in lowercase, otherwise you will not be able to connect to the iSCSI disks created.