[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
howtos:network_services:iscsi [2019/11/09 01:08 (UTC)] – [Configuration] bifferos | howtos:network_services:iscsi [2019/12/01 01:25 (UTC)] (current) – bifferos | ||
---|---|---|---|
Line 42: | Line 42: | ||
The kernel modules are also loaded automatically by Slackware-current. | The kernel modules are also loaded automatically by Slackware-current. | ||
- | ==== Configuration ==== | + | ==== Target |
- | First, get the initiator ID from the client: | + | First, get the initiator ID from the initiator (client): |
< | < | ||
# cat / | # cat / | ||
</ | </ | ||
- | Then on the server | + | Mine looks like this: |
+ | < | ||
+ | InitiatorName=iqn.2005-03.org.open-iscsi: | ||
+ | </ | ||
+ | |||
+ | It will be important later. | ||
+ | |||
+ | Next we need to configure our target (that' | ||
+ | |||
+ | < | ||
+ | slpkg -s sbo targetcli-fb | ||
+ | </ | ||
+ | |||
+ | Targetcli requires a directory to store its data, make sure it exists: | ||
< | < | ||
# mkdir /etc/target | # mkdir /etc/target | ||
</ | </ | ||
+ | |||
+ | targetcli is a bit like a command-line directory browser except you use it to change values in a hierarchical store. That same hierarchy also contains the commands you invoke to make changes, however. | ||
+ | |||
+ | Start by launching targetcli | ||
+ | |||
+ | < | ||
+ | # targetcli | ||
+ | targetcli shell version 2.1.51 | ||
+ | Copyright 2011-2013 by Datera, Inc and others. | ||
+ | For help on commands, type ' | ||
+ | |||
+ | /> | ||
+ | </ | ||
+ | |||
+ | Assuming you have a spare (unused) disk, you can now create a block device, e.g.: | ||
+ | |||
+ | < | ||
+ | /> backstores/ | ||
+ | Created block storage object block using /dev/sdb. | ||
+ | </ | ||
+ | |||
+ | Next move to the iscsi target creation step. Just type create and allow the target to be given a generated name, it's good enough for our purposes. | ||
+ | |||
+ | < | ||
+ | /> iscsi/ | ||
+ | /iscsi> create | ||
+ | created target iqn.2003-01.org.linux-iscsi.iscsi-server.x8664: | ||
+ | Created TPG 1. | ||
+ | Global pref auto_add_default_portal=true | ||
+ | Created default portal listening on all IPs (0.0.0.0), port 3260 | ||
+ | </ | ||
+ | |||
+ | Next create LUN for the created target. Type the name of the target/tpg1 to move to the configuration area: | ||
+ | |||
+ | < | ||
+ | /iscsi> iqn.2003-01.org.linux-iscsi.iscsi-server.x8664: | ||
+ | </ | ||
+ | |||
+ | Then configure it: | ||
+ | |||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Then add an ACL by moving into the acl area and creating an ACL which matches the name of the initiator name that you got from the client: | ||
+ | |||
+ | < | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Simply exit to save your changes: | ||
+ | |||
+ | < | ||
+ | /> exit | ||
+ | Global pref auto_save_on_exit=true | ||
+ | Last 10 configs saved in / | ||
+ | Configuration saved to / | ||
+ | # | ||
+ | </ | ||
+ | |||
+ | ==== Service Setup ==== | ||
TO BE CONTINUED.... | TO BE CONTINUED.... |