Ubuntu Initiator Woes

iSCSI related applications
Post Reply
guszernial
Starting out
Posts: 19
Joined: Thu Mar 07, 2019 11:21 am

Ubuntu Initiator Woes

Post by guszernial »

I'm unable to login to my QNAP TS-x73 iscsi target LUNs from my Ubuntu 18.10 PC with open-iscsi version 2.0.874-5ubuntu9.3 installed. Ideas to diagnose and/or fix appreciated.

The QNAP has (2) 512GB nvme SSDs set up as cache, and a single data LUN target on a RAID10 array of (4) 2TB Seagate IronWolf Pro HDDs. I enabled CHAP authentication on the target. In /etc/iscsi/iscsid.conf I've tried both node.startup=manual|automatic, and I have node.session.auth.authmethod = CHAP and
node.session.auth.username = [myCHAPusernameonQNAP]
node.session.auth.password = [myCHAPpasswordonQNAP]

I've been able to get the QNAP node targetname iqn.etc... and port 192.xx.xx.xx:3260. Then here's what happens:

#iscsiadm -m node --targetname iqn.etc.... -p 192.xx.xx.xx,1 --login

Logging in to [iface: default, target: iqn.etc..., portal: 192.xx.xx.xx,3260] (multiple)
iscsiadm: got read error (-1/104), daemon died?
iscsiadm: Could not login to [iface: default, target: iqn.etc..., portal: 192.xx.xx.xx,3260].
iscsiadm: initiator reported error (18 - could not communicate to iscsid)
iscsiadm: Could not log into all portals
User avatar
storageman
Ask me anything
Posts: 5507
Joined: Thu Sep 22, 2011 10:57 pm

Re: Ubuntu Initiator Woes

Post by storageman »

Is ISCSI service on?
Turn off chap, start simple mate!
Then add complexity.
Can you connect to it with anything else,like Windows PC?
Can you connect to it with itself 127.0.0.1 and Remote disk.
guszernial
Starting out
Posts: 19
Joined: Thu Mar 07, 2019 11:21 am

Re: Ubuntu Initiator Woes

Post by guszernial »

OK, thanks storageman, progress being made. From my linux initiator, after disabling CHAP authentication on the QNAP, I was able to connect/access, format (FAT32), mount, use, set rw permissions, create/save/store, and reopen a test file on my QNAP iscsi target LUN. I was also able to access the file from a mac/macos initiator, but not from a Win 10 initiator, which seemed to want me to reformat the iscsi target LUN, which of course would destroy my testfile.

So next question - how to connect to an existing target and access existing files from Win10?

And then on to CHAP. I have a linux initiator box user:password, a QNAP target box user(admin):password, and a target LUN CHAP user/password. The linux initiator box default iscsid.conf file contains the below for CHAP. After re-enabling CHAP authentication on the QNAP target, I know to uncomment the authmethod lines in iscsid.conf to use CHAP, but can't figure out which of the preceeding user/password combinations to use in each case in the iscsid.conf

#*************
#CHAP Settings
#*************

#To enable CHAP authentication set node.session.auth.authmethod
#to CHAP. The default is None.
#node.session.auth.authmethod = CHAP

# To set a CHAP username and password for initiator
# authentication by the target(s), uncomment the following lines:
# node.session.auth.username = username
# node.session.auth.password = password

# To set a CHAP username and password for target(s)
# authentication by the initiator, uncomment the following lines:
#node.session.auth.username_in = username_in
#node.session.auth.password_in = password_in

# To enable CHAP authentication for a discovery session to the target
# set discovery.sendtargets.auth.authmethod to CHAP. The default is None.
# discovery.sendtargets.auth.authmethod = CHAP

# To set a discovery session CHAP username and password for the initiator
# authentication by the target(s), uncomment the following lines:
# discovery.sendtargets.auth.username = username
# discovery.sendtargets.auth.password = password

# To set a discovery session CHAP username and password for target(s)
# authentication by the initiator, uncomment the following lines:
#discovery.sendtargets.auth.username_in = username_in
#discovery.sendtargets.auth.password_in = password_in
User avatar
storageman
Ask me anything
Posts: 5507
Joined: Thu Sep 22, 2011 10:57 pm

Re: Ubuntu Initiator Woes

Post by storageman »

guszernial wrote: Wed Mar 20, 2019 11:05 pm OK, thanks storageman, progress being made. From my linux initiator, after disabling CHAP authentication on the QNAP, I was able to connect/access, format (FAT32), mount, use, set rw permissions, create/save/store, and reopen a test file on my QNAP iscsi target LUN. I was also able to access the file from a mac/macos initiator, but not from a Win 10 initiator, which seemed to want me to reformat the iscsi target LUN, which of course would destroy my testfile.

So next question - how to connect to an existing target and access existing files from Win10?

And then on to CHAP. I have a linux initiator box user:password, a QNAP target box user(admin):password, and a target LUN CHAP user/password. The linux initiator box default iscsid.conf file contains the below for CHAP. After re-enabling CHAP authentication on the QNAP target, I know to uncomment the authmethod lines in iscsid.conf to use CHAP, but can't figure out which of the preceeding user/password combinations to use in each case in the iscsid.conf

#*************
#CHAP Settings
#*************

#To enable CHAP authentication set node.session.auth.authmethod
#to CHAP. The default is None.
#node.session.auth.authmethod = CHAP

# To set a CHAP username and password for initiator
# authentication by the target(s), uncomment the following lines:
# node.session.auth.username = username
# node.session.auth.password = password

# To set a CHAP username and password for target(s)
# authentication by the initiator, uncomment the following lines:
#node.session.auth.username_in = username_in
#node.session.auth.password_in = password_in

# To enable CHAP authentication for a discovery session to the target
# set discovery.sendtargets.auth.authmethod to CHAP. The default is None.
# discovery.sendtargets.auth.authmethod = CHAP

# To set a discovery session CHAP username and password for the initiator
# authentication by the target(s), uncomment the following lines:
# discovery.sendtargets.auth.username = username
# discovery.sendtargets.auth.password = password

# To set a discovery session CHAP username and password for target(s)
# authentication by the initiator, uncomment the following lines:
#discovery.sendtargets.auth.username_in = username_in
#discovery.sendtargets.auth.password_in = password_in
Don't mess with the file use the GUI
For Win 10 it should be NTFS
guszernial
Starting out
Posts: 19
Joined: Thu Mar 07, 2019 11:21 am

Re: Ubuntu Initiator Woes

Post by guszernial »

I can't find the GUI for a Linux initiator - do you have a package name and/or link?

Thx, Randy
User avatar
storageman
Ask me anything
Posts: 5507
Joined: Thu Sep 22, 2011 10:57 pm

Re: Ubuntu Initiator Woes

Post by storageman »

I thought you meant Qnap side
If you can't get chap to work just use LUN masking
https://docs.qnap.com/nas/4.1/SMB/en/in ... _linux.htm
guszernial
Starting out
Posts: 19
Joined: Thu Mar 07, 2019 11:21 am

Re: Ubuntu Initiator Woes

Post by guszernial »

OK, so I see how ACLs work, and it brings up a question. The plan here is to have multiple clients/initiators - Window, Mac and Linux - access, share and modify files on the QNAP storage. Multiple clients need rw access to the same file, tho not simultaneously. So the question is, given that we want to use iscsi LUNs, does the QNAP have the ability to do file-level locking for the shared files in a LUN?

Also in the future we would like to house shared database files on a LUN, but in that case the DBMS would be responsible for record-level locking.
User avatar
storageman
Ask me anything
Posts: 5507
Joined: Thu Sep 22, 2011 10:57 pm

Re: Ubuntu Initiator Woes

Post by storageman »

No, you cannot share LUNs except in a cluster (Hyper-V, VMware,, Citrix) otherwise you'll get data corruption.
For shared storage use shares.
guszernial
Starting out
Posts: 19
Joined: Thu Mar 07, 2019 11:21 am

Re: Ubuntu Initiator Woes

Post by guszernial »

What about Linux clustering, like RedHat clustering?
User avatar
storageman
Ask me anything
Posts: 5507
Joined: Thu Sep 22, 2011 10:57 pm

Re: Ubuntu Initiator Woes

Post by storageman »

Approval is important (for Qnap support) but yes that too.
Key term is "persistent reservation" in controlling who writes to the LUN.
https://access.redhat.com/documentation ... ce-scsi-ca
Post Reply

Return to “iSCSI – Target & Virtual Disk”