Back to the main page
Create iSCSI LUN on ZFS storage appliance
With iSCSI you export block device over network, here is how to create iSCSI LUN on ZFS applinace ZS3-2, using Web interface.
Identify host IQN
An IQN (iSCSI Qualified Name) is used to identify a host to a ZFS storage.
[root@host]# cat /etc/iscsi/initiatorname.iscsi
Setup CHAP authentication
Maybe next time!?
Define iSCSI target and target group
A target group is created on ZFS storage to define ports and protocols, this is for a LUN to be accessed by a server.
Here, target group contains a LUN (iSCSI target), the LUN is identified by default IQN for ZFS storage
and presented over default storage interface.
- Configuration - SAN - Targets (at the right)
- Select + for iSCSI Targets
- Target IQN is auto assigned, later will be assigned something like iqn.1986-03.com.sun:02:025e2911-0cbe-c814-a5db-904aab8ce020
- Chose meaningful alias and select relevant net interfaces
- Now when you have target, create new target group for it.
Point mouse over target, see "move" icon, move target to Group on the right, new entry appears,
drop target to that entry, and new group is created. You can rename the group to something more meaningful.
- Finally apply the change
Define iSCSI initiator and initiator group
In order to control access to a LUN, an iSCSI initiator has to be defined.
Typically, a single initiator is given access to a LUN (to prevent possible data corruption), unless a LUN is for clustered systems.
The iSCSI initiator is defining a host to ZFS storage, it contains host IQN, so now we need to register host IQN with ZFS storage.
- Configuration - SAN - Initiators (at the right)
- Select + for iSCSI Initiators
- Enter Initiator IQN, this is known from the host (see above)
- Enter Alias (likely it's hostname)
- Add the initiator to a group, same process like with target, drag and drop.
Rename group to something meaningful. Here one group has only one initiator (for clusters, one group can have more initiators)
There is QA project, a LUN is created there.
Select previously created target and initiator groups.
Using LUN on OL7
The discover the LUN
# systemctl start iscsid
# iscsiadm -m discovery -t sendtargets -p [zfs-appliance]
# iscsiadm -m node -p [zfs-appliance]
Back to the main page