]> git.proxmox.com Git - ceph.git/blame - ceph/doc/rbd/iscsi-initiator-linux.rst
import quincy beta 17.1.0
[ceph.git] / ceph / doc / rbd / iscsi-initiator-linux.rst
CommitLineData
b32b8144
FG
1-------------------------
2iSCSI Initiator for Linux
3-------------------------
181888fb
FG
4
5**Prerequisite:**
6
b32b8144 7- Package ``iscsi-initiator-utils``
181888fb 8
b32b8144 9- Package ``device-mapper-multipath``
181888fb
FG
10
11**Installing:**
12
13Install 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
b32b8144 23 ``multipathd`` service:
181888fb
FG
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"
20effc67 36 product "TCMU device"
181888fb
FG
37 hardware_handler "1 alua"
38 path_grouping_policy "failover"
39 path_selector "queue-length 0"
40 failback 60
41 path_checker tur
42 prio alua
43 prio_args exclusive_pref_bit
b32b8144 44 fast_io_fail_tmo 25
181888fb
FG
45 no_path_retry queue
46 }
47 }
48
49#. Restart the ``multipathd`` service:
50
51 ::
52
53 # systemctl reload multipathd
54
55**iSCSI Discovery and Setup:**
56
b32b8144
FG
57#. If CHAP was setup on the iSCSI gateway, provide a CHAP username and
58 password by updating the ``/etc/iscsi/iscsid.conf`` file accordingly.
59
181888fb
FG
60#. Discover the target portals:
61
62 ::
63
11fdf7f2 64 # iscsiadm -m discovery -t st -p 192.168.56.101
181888fb
FG
65 192.168.56.101:3260,1 iqn.2003-01.org.linux-iscsi.rheln1
66 192.168.56.102:3260,2 iqn.2003-01.org.linux-iscsi.rheln1
67
68#. Login to target:
69
70 ::
71
72 # iscsiadm -m node -T iqn.2003-01.org.linux-iscsi.rheln1 -l
73
74**Multipath IO Setup:**
75
76The multipath daemon (``multipathd``), will set up devices automatically
77based on the ``multipath.conf`` settings. Running the ``multipath``
78command show devices setup in a failover configuration with a priority
79group for each path.
80
81::
82
83 # multipath -ll
84 mpathbt (360014059ca317516a69465c883a29603) dm-1 LIO-ORG ,IBLOCK
85 size=1.0G features='0' hwhandler='1 alua' wp=rw
86 |-+- policy='queue-length 0' prio=50 status=active
87 | `- 28:0:0:1 sde 8:64 active ready running
88 `-+- policy='queue-length 0' prio=10 status=enabled
89 `- 29:0:0:1 sdc 8:32 active ready running
90
91You should now be able to use the RBD image like you would a normal
92multipath’d iSCSI disk.
20effc67
TL
93
944. Logout from target:
95
96 ::
97
98 # iscsiadm -m node -T iqn.2003-01.org.linux-iscsi.rheln1 -u