storage-connector docs - configure iscsi

Configure iSCSI

Set the storage-type to “iscsi” and configure the target and port.

juju config storage-connector \
    storage-type='iscsi' \
    iscsi-target=<TARGET_IP> \
    iscsi-port=<PORT>

The iSCSI initiator name can be configured through the initiator-dictionary config option. This modifies the /etc/iscsi/initiatorname.iscsi file and allows you to specify the node’s initiator name (which will be generated randomly otherwise).

juju config storage-connector \
     initiator-dictionary='{"hostname1": "iqn.yyyy-mm.naming-authority:uniquename1", "hostname2": "iqn.yyyy-mm.naming-authority:uniquename2"}'

The restarting of the services after iSCSI related changes does not happen automatically. Read more about the reasoning behind this here.

Restart the iSCSI services through the restart-services charm action.

juju run storage-connector/0 restart-services --params services="iscsid open-iscsi"