]> git.proxmox.com Git - ceph.git/blob - ceph/doc/rbd/iscsi-initiator-linux.rst
update sources to v12.2.3
[ceph.git] / ceph / doc / rbd / iscsi-initiator-linux.rst
1 -------------------------
2 iSCSI Initiator for Linux
3 -------------------------
4
5 **Prerequisite:**
6
7 - Package ``iscsi-initiator-utils``
8
9 - Package ``device-mapper-multipath``
10
11 **Installing:**
12
13 Install the iSCSI initiator and multipath tools:
14
15 ::
16
17 # yum install iscsi-initiator-utils
18 # yum install device-mapper-multipath
19
20 **Configuring:**
21
22 #. Create the default ``/etc/multipath.conf`` file and enable the
23 ``multipathd`` service:
24
25 ::
26
27 # mpathconf --enable --with_multipathd y
28
29 #. Add the following to ``/etc/multipath.conf`` file:
30
31 ::
32
33 devices {
34 device {
35 vendor "LIO-ORG"
36 hardware_handler "1 alua"
37 path_grouping_policy "failover"
38 path_selector "queue-length 0"
39 failback 60
40 path_checker tur
41 prio alua
42 prio_args exclusive_pref_bit
43 fast_io_fail_tmo 25
44 no_path_retry queue
45 }
46 }
47
48 #. Restart the ``multipathd`` service:
49
50 ::
51
52 # systemctl reload multipathd
53
54 **iSCSI Discovery and Setup:**
55
56 #. If CHAP was setup on the iSCSI gateway, provide a CHAP username and
57 password by updating the ``/etc/iscsi/iscsid.conf`` file accordingly.
58
59 #. Discover the target portals:
60
61 ::
62
63 # iscsiadm -m discovery -t -st 192.168.56.101
64 192.168.56.101:3260,1 iqn.2003-01.org.linux-iscsi.rheln1
65 192.168.56.102:3260,2 iqn.2003-01.org.linux-iscsi.rheln1
66
67 #. Login to target:
68
69 ::
70
71 # iscsiadm -m node -T iqn.2003-01.org.linux-iscsi.rheln1 -l
72
73 **Multipath IO Setup:**
74
75 The multipath daemon (``multipathd``), will set up devices automatically
76 based on the ``multipath.conf`` settings. Running the ``multipath``
77 command show devices setup in a failover configuration with a priority
78 group for each path.
79
80 ::
81
82 # multipath -ll
83 mpathbt (360014059ca317516a69465c883a29603) dm-1 LIO-ORG ,IBLOCK
84 size=1.0G features='0' hwhandler='1 alua' wp=rw
85 |-+- policy='queue-length 0' prio=50 status=active
86 | `- 28:0:0:1 sde 8:64 active ready running
87 `-+- policy='queue-length 0' prio=10 status=enabled
88 `- 29:0:0:1 sdc 8:32 active ready running
89
90 You should now be able to use the RBD image like you would a normal
91 multipath’d iSCSI disk.