Other iSCSI Syntax for multiple TargetAddresses in /etc/iscsi.conf

clem16

New Member


Messages: 1

I am looking for the correct way to list multiple IP addresses in /etc/iscsi.conf

My storage server has both ipv4 (static) and ipv6 (ULA & GUA) assigned.

I'd like to set order of use to be:
1: IPV6 ULA
2: IPV6 GUA
3: IPV4 Static

That way:
- 1: If I am on my local network I can connect with IPV6 ULA.
- 2: If I am away from home the IPV6 GUA is used.
- 3: If I am home and my router that hands out IPV6 is down (which sometimes happens) and only my switch is up, I can still connect to my IPV4's static address.

---

Looking at the example provided in the handbook. (Handbook) Section: 30.12.2.2
Code:
t0 {
    TargetAddress   = 10.10.10.10
    TargetName      = iqn.2012-06.com.example:target0
    AuthMethod      = CHAP
    chapIName       = user
    chapSecret      = secretsecret
}

I don't see and example of how to list more than one IP as a TargetAddress.

---

I have tried a "space" and a "," between addresses, as well as multiple "TargetAddress = " entries.

Thanks for your time.
 

Alain De Vos

Daemon

Reaction score: 347
Messages: 1,290

I'm not a specialist. Maybe this,
Code:
t0 {
    TargetAddress   = 10.10.10.10
    TargetName      = iqn.2012-06.com.example:target0
    AuthMethod      = CHAP
    chapIName       = user
    chapSecret      = secretsecret
}

t1 {
    TargetAddress   = 10.10.10.11
    TargetName      = iqn.2012-06.com.example:target1
    AuthMethod      = CHAP
    chapIName       = user
    chapSecret      = secretsecret
}
 

cmoerz

Member

Reaction score: 14
Messages: 38

According to iscsi.conf() there's no way to set multiple IP addresses for target host.

You could try providing a hostname that resolves to multiple addresses, but my bet is, that this won't work reliably. You could also cobble together some shell script that sets the target address dynamically and reloads the ctld service.

Personally, I'd recommend looking at alternative technologies. ISCSI is probably not the best choice to use storage while you're on the go. At the end of the day, I don't know your particular use case, so obviously you might have your reasons.
 
Top