Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / doc / rbd / iscsi-initiator-win.rst
1 -----------------------------------------
2 The iSCSI Initiator for Microsoft Windows
3 -----------------------------------------
4
5 **Prerequisite:**
6
7 -  Microsoft Windows 2016
8
9 **iSCSI Initiator, Discovery and Setup:**
10
11 #. Install the iSCSI initiator driver and MPIO tools.
12
13 #. Launch the MPIO program, click on the “Discover Multi-Paths” tab select “Add
14    support for iSCSI devices”.
15
16 #. On the iSCSI Initiator Properties window, on the "Discovery" tab, add a target
17    portal. Enter the IP address or DNS name and Port of the Ceph iSCSI gateway.
18
19 #. On the “Targets” tab, select the target and click on “Connect”.
20
21 #. On the “Connect To Target” window, select the “Enable multi-path” option, and
22    click the “Advanced” button.
23
24 #. Under the "Connet using" section, select a “Target portal IP” . Select the
25    “Enable CHAP login on” and enter the "Name" and "Target secret" values from the
26    Ceph iSCSI Ansible client credentials section, and click OK.
27
28 #. Repeat steps 5 and 6 for each target portal defined when setting up
29    the iSCSI gateway.
30
31 **Multipath IO Setup:**
32
33 Configuring the MPIO load balancing policy, setting the timeout and
34 retry options are using PowerShell with the ``mpclaim`` command. The
35 reset is done in the MPIO tool.
36
37 .. note::
38   It is recommended to increase the ``PDORemovePeriod`` option to 120
39   seconds from PowerShell. This value might need to be adjusted based
40   on the application. When all paths are down, and 120 seconds
41   expires, the operating system will start failing IO requests.
42
43 ::
44
45     Set-MPIOSetting -NewPDORemovePeriod 120
46
47 ::
48
49     mpclaim.exe -l -m 1
50
51 ::
52
53     mpclaim -s -m
54     MSDSM-wide Load Balance Policy: Fail Over Only
55
56 #. Using the MPIO tool, from the “Targets” tab, click on the
57    “Devices...” button.
58
59 #. From the Devices window, select a disk and click the
60    “MPIO...” button.
61
62 #. On the "Device Details" window the paths to each target portal is
63    displayed. If using the ``ceph-ansible`` setup method, the
64    iSCSI gateway will use ALUA to tell the iSCSI initiator which path
65    and iSCSI gateway should be used as the primary path. The Load
66    Balancing Policy “Fail Over Only” must be selected
67
68 ::
69
70     mpclaim -s -d $MPIO_DISK_ID
71
72 .. note::
73   For the ``ceph-ansible`` setup method, there will be one
74   Active/Optimized path which is the path to the iSCSI gateway node
75   that owns the LUN, and there will be an Active/Unoptimized path for
76   each other iSCSI gateway node.
77
78 **Tuning:**
79
80 Consider using the following registry settings:
81
82 -  Windows Disk Timeout
83
84    ::
85
86        HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Disk
87
88    ::
89
90        TimeOutValue = 65
91
92 -  Microsoft iSCSI Initiator Driver
93
94    ::
95
96        HKEY_LOCAL_MACHINE\\SYSTEM\CurrentControlSet\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}\<Instance_Number>\Parameters
97
98    ::
99        LinkDownTime = 25
100        SRBTimeoutDelta = 15