Proxmox with iscsi Setup

AS-eurus

New Member
Mar 19, 2024
7
0
1
Hi Guys,

I am very new for proxmox and planning to use it for my private cloud so i have installed proxmox latest version and it is flawless and very smooth. Now i am trying to use iscsi storage option but unable to do.

I have installed a iscsi target on Debian-12 from this

https://www.server-world.info/en/note?os=Debian_12&p=iscsi&f=1


And proxmox able to discovered but unable to connect to iscsi target.

1. I have attached /etc/iscsi/iscsid.conf conf and proxmox web storage target info..
2. CHAP username/password is: admin/admin for > target: iqn.2024-03.19proxmox.srv:dlp.target01
3. CHAP username/password is: username/password > target: iqn.2024-03.20disk02.srv:dlp.target02


Please advise and guide me to configure it!

Many Thanks.
AS
 

Attachments

  • iiscsid.conf.txt
    14.2 KB · Views: 2
  • iscsi-targets.png
    iscsi-targets.png
    22.1 KB · Views: 4
And proxmox able to discovered but unable to connect to iscsi target.
Can you explain what "unable to connect" means exactly? Have you examined the log - "journalctl -n 500" immediately after connection/configuration attempt?
1. I have attached /etc/iscsi/iscsid.conf conf and proxmox web storage target info..
2. CHAP username/password is: admin/admin for > target: iqn.2024-03.19proxmox.srv:dlp.target01
3. CHAP username/password is: username/password > target: iqn.2024-03.20disk02.srv:dlp.target02
At first glance the context of the config file does not match description above.
You only have one set of defined authentication material where you probably should have per target config. I am also not sure the last two lines are legal.
You should refer to the iscsid.conf man page for more information: https://linux.die.net/man/5/iscsi.conf

Good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Hi bbgeek17,

Thanks for your response and looking into this. I have attached logs.

Thanks,
AS
 

Attachments

  • logs.txt.txt
    57.1 KB · Views: 2
The logs are pretty explicit:
Code:
Mar 20 12:36:25 proxmox1 pvedaemon[895]: command '/usr/bin/iscsiadm --mode node --targetname iqn.2024-03.20disk02.srv:dlp.target02 --login' failed: exit code 24
Mar 20 12:36:25 proxmox1 iscsid[117502]: Connection15314:0 to [target: iqn.2024-03.20disk02.srv:dlp.target02, portal: 192.168.2.132,3260] through [iface: default] is shutdown.
Mar 20 12:36:25 proxmox1 iscsid[117502]: connection15315:0 login rejected: initiator failed authorization with target
Mar 20 12:36:25 proxmox1 iscsid[117502]: Connection15315:0 to [target: iqn.2024-03.20disk02.srv:dlp.target02, portal: 192.168.2.132,3260] through [iface: default] is shutdown.
Mar 20 12:36:25 proxmox1 iscsid[117502]: connection15316:0 login rejected: initiator failed authorization with target
Mar 20 12:36:25 proxmox1 iscsid[117502]: Connection15316:0 to [target: iqn.2024-03.20disk02.srv:dlp.target02, portal: 192.168.2.132,3260] through [iface: default] is shutdown.
Mar 20 12:36:25 proxmox1 iscsid[117502]: connection15317:0 login rejected: initiator failed authorization with target
Mar 20 12:36:25 proxmox1 iscsid[117502]: Connection15317:0 to [target: iqn.2024-03.20disk02.srv:dlp.target02, portal: 192.168.2.132,3260] through [iface: default] is shutdown.

Authentication induced issues, as suspected.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Yes, but all CHAP auth is fine which is why i am not getting where to look now? Please find CHAP auth settings.

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

# To configure which CHAP algorithms to enable, set
# node.session.auth.chap_algs to a comma separated list.
# The algorithms should be listed in order of decreasing
# preference — in particular, with the most preferred algorithm first.
# Valid values are MD5, SHA1, SHA256, and SHA3-256.
# The default is MD5.
node.session.auth.chap_algs = SHA3-256,SHA256,SHA1,MD5

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

# 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
#node.session.auth.username_in = eurus
#node.session.auth.password_in = eurus
 
You said that you have two separate sets of username/passwords for two targets
2. CHAP username/password is: admin/admin for > target: iqn.2024-03.19proxmox.srv:dlp.target01
3. CHAP username/password is: username/password > target: iqn.2024-03.20disk02.srv:dlp.target02
That means that you should have two Option J entries.
If you have changed the configuration since your original post, then you need to adjust the config file and restart iscsid daemon.
Do i need to do anything else or i am on the right path?
The article you are referring to describes the iSCSI Target configuration. I am assuming that you have done that properly (it is outside of scope of this forum). The issue you are having is on iSCSI Initiator side.

This is not a Proxmox/PVE issue, but basic iSCSI configuration challenge. If you cant connect via "iscsiadm" directly from command line, then PVE (which uses the same exact tool) wont be able to connect either.
Take a look at these (or similar) articles and follow the steps to get your environment in order:
https://access.redhat.com/documenta... to the target with the displayed target IQN:
https://ubuntu.com/server/docs/service-iscsi#:~:text=discovering the targets
https://www.seagate.com/manuals/lyv...=Discover and map the initiator to the target



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
You said that you have two separate sets of username/passwords for two targets

That means that you should have two Option J entries.
If you have changed the configuration since your original post, then you need to adjust the config file and restart iscsid daemon.

The article you are referring to describes the iSCSI Target configuration. I am assuming that you have done that properly (it is outside of scope of this forum). The issue you are having is on iSCSI Initiator side.

This is not a Proxmox/PVE issue, but basic iSCSI configuration challenge. If you cant connect via "iscsiadm" directly from command line, then PVE (which uses the same exact tool) wont be able to connect either.
Take a look at these (or similar) articles and follow the steps to get your environment in order:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_storage_devices/configuring-an-iscsi-initiator_managing-storage-devices#:~:text=Discover the target and log in to the target with the displayed target IQN:
https://ubuntu.com/server/docs/service-iscsi#:~:text=discovering the targets
https://www.seagate.com/manuals/lyve-mobile-rackmount-receiver/iscsi-network-setup-linux-ubuntu-debian/#:~:text=Discover and map the initiator to the target



Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox

Hi bbgeek17,


>> You said that you have two separate sets of username/passwords for two targets

yes, i said because i am trying to different username/password on different targets.

>> If you have changed the configuration since your original post, then you need to adjust the config file and restart iscsid daemon.

Yes, i did.

>> I am not saying it is proxmox issue, i am just looking help to figure out this issue and use Proxmox for my Private cloud.

Many Thanks,
AS
 
Hi @bbgeek17,

I am able to add iscsi target in proxmox. And i want to use this storage for VM but when creating VM it did not show up on the storage allocation list! What could be the problem?

pvesm status
Name Type Status Total Used Available %
Iscsi-01 iscsi active 0 0 0 0.00%
Iscsi-192-Vol_1 lvm active 26210304 0 26210304 0.00%
local dir active 98497780 6023480 87424752 6.12%
local-lvm lvmthin active 833388544 4666975 828721568 0.56%

I have attached screenshots of available stroage and storage allocation list for your reference.

Thanks,
AS
 

Attachments

  • stg-192.png
    stg-192.png
    78.1 KB · Views: 8
  • stg allocation list.png
    stg allocation list.png
    26.8 KB · Views: 8
I am able to add iscsi target in proxmox. And i want to use this storage for VM but when creating VM it did not show up on the storage allocation list! What could be the problem?
Probably because you are in ISO/OS selection portion of the wizard where you can pick an ISO file from file system based storage.
Since iSCSI is block based you cant use it here. You can select "none" for the CD and move along to System and then DISK portion where you may be able to pick storage location, if you did all prerequisites properly.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Hi @bbgeek17,

Yes, you are absolutely right. I am able to find iscsi storage now and spin a VM as well.

One more question is that can i add multiple iscsi-storage with different chap auth? Actually, i have tried but unable to get success till now.

Many Thanks,
AS
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!