Define Network adapter for Datastore via iSCSI

nr3

New Member
Mar 13, 2023
9
0
1
Hello everyone
I have connected a datastore via iSCSI.
Is it possible to define that it is addressed with a specific network adapter or bridge, e.g. vmbr2 or ens4?
Thank you very much
 
Last edited:
PVE will use the nic(s)/vlan/bond/bridge were there's an IP that can reach the target. So, it depends on your network configuration and the network configuration of the target (i.e. on which IPs of the target the portal is served).
 
Thanks for your reply. I have assigned an IP to 2 NICs in the same VLAN on my PBS so that both (admin interface and reserved NIC for iSCSI) can reach the target. Do I have to work with VLANs, which I don't necessarily want to do, or can I define somewhere that this iSCSI target should go via the adapter I have provided for it?
 
/etc/network/interfaces looks like this:

auto lo
iface lo inet loopback

auto ens40
iface ens40 inet static
address 10.10.10.2/24
gateway 10.10.10.1

source /etc/network/interfaces.d/*

auto ens41
iface ens41 inet static
address 10.10.10.3/24
#iSCSI-1

auto ens42
iface ens42 inet static
address 10.10.10.4/24
#iSCSI-2

/etc/pve/storage.cfg does not exist because I have a PBS.
I could not find storage.cfg on the system, not even in a different location
 
You should not have the same network configured in more than one interface: the system will not really know which one to use to reach the systems in that network and there might be issues with ARP depending on the values of rp_filter.

You need a different network for each interface, let's say 10.10.10.x/24 for management, 10.10.11.x/24 for iSCSI1 and 10.10.12.x24 for iSCSI2. Your iSCSI target will need to have an IP on both iSCSI networks, publish the LUN through both and on PBS you will need multipath. Alternatively, create a bond with ens41 and ens42, assign an IP 10.10.11.x/24 and the iSCSI target will only need to be in one network.

Ideally, each subnet should be in it's own VLAN.
 
thank you very much for your explanations, i will start to rebuild it
 

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!