For all the iSCSI examples bellow please consider the following netplan configuration for my iSCSI initiator:
/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
{ c o n f i g : d i s a b l e d }
/etc/netplan/50-cloud-init.yaml
network :
e t h e r n e t s :
enp5s0 :
match :
macaddress : 0 0 : 1 6 : 3 e : a f : c4 : d6
s e t −name : e t h 0
dhcp4 : t r u e
dhcp− i d e n t i f i e r : mac
enp6s0 :
match :
macaddress : 0 0 : 1 6 : 3 e : 5 0 : 1 1 : 9 c
s e t −name : i s c s i 0 1
dhcp4 : t r u e
dhcp− i d e n t i f i e r : mac
dhcp4−o v e r r i d e s :
r o u t e −m e t r i c : 300
enp7s0 :
match :
macaddress : 0 0 : 1 6 : 3 e : b3 : c c : 5 0
s e t −name : i s c s i 0 2
dhcp4 : t r u e
dhcp− i d e n t i f i e r : mac
dhcp4−o v e r r i d e s :
r o u t e −m e t r i c : 300
v e r s i o n : 2
r e n d e r e r : networkd
With this configuration, the interfaces names change by matching their mac addresses. This makes it easier
to manage them in a server containing multiple interfaces.
From this point and beyond, 2 interfaces are going to be mentioned:
iscsi01 and
iscsi02. This helps to
demonstrate how to configure iSCSI in a multipath environment as well (check the Device Mapper Multipath
session in this same Server Guide).
If you have only a single interface for the iSCSI network, make sure to follow the same instructions,
but only consider the
iscsi01 interface command line examples.
Do'stlaringiz bilan baham: