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