/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Administration/Server/Storage/iscsi.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2017-04-03 02:45:17 UTC
  • Revision ID: csa@suren.me-20170403024517-dwzj0z0k1cmhxm7u
Restructuring, OpenShift, Ansible, Git

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
iSCSI / iSER
 
2
------------
 
3
 - According to the benchmarks on the net, iSCSI delivers performance on the
 
4
 pair with NFS. Few my tests reported about 350 MB/s on the storage capable
 
5
 of 3.5 GB/s, though I have not did any tunning. So, we are only interested
 
6
 in iSER solutions for high performance systems.
 
7
 
 
8
 - Terminology
 
9
    Target: the server part of protocol
 
10
    Initiator: the iSCSI client
 
11
 
 
12
 - According to the standard multiple initiators may share a single target.
 
13
 This is supported by most of the stacks. However, synchronization issues
 
14
 are up to the user. So, it is only possible to use with some higher level
 
15
 clustering filesystem taking care for locking (for example GFS2).
 
16
 
 
17
 Server stacks:
 
18
  ietd - no iSER support (on 28.11.2012)
 
19
  scst - re-implementation of ietd (still no iSER according to documentation)
 
20
  stgt - iSER support, but known being not that fast.
 
21
  lio/tcm - iSER support is expected in kernel 3.9
 
22
 
 
23
 Client stacks:
 
24
  openiscsi     - iSER is supported
 
25
 
 
26
  stgt
 
27
  ====
 
28
    - OpenSuSE does not include support for iSER. The package should be recompiled
 
29
    adding  ISCSI_RDMA=1 to make command
 
30
    - IPV6 can be a problem (unless configured and used, I guess). The tgtd will 
 
31
    complain about missing/misbehaving iser driver. Removing ipv6 support fixes
 
32
    the issue (YaST/Network Devices/General/Enable IPV6)
 
33
    - mdadm may detect the softraid on the partitions to forward and initialize
 
34
    partial mdarray. Then, tgt will see what partition is already used and will
 
35
    refuse to share it. Restrict the devices used for software raid in /etc/mdadm.conf
 
36
    helps to resolve issue:
 
37
        DEVICE /dev/sd[ab]*
 
38
    
 
39
    List current configuration:
 
40
        tgtadm --lld iscsi --op show --mode target
 
41
    When properly configured you expected to see:
 
42
        Target 1: iqn.ipepdvcompute2.ssd3500
 
43
            Driver: iser
 
44
        LUN: 0 (this is the virtual adapter LUN)
 
45
        LUN: 1 (this is a first published disk LUN)
 
46
 
 
47
    Configuring (create interface, allow access, and create first disk):
 
48
        tgtadm --lld iser --mode target --op new --tid 1 --targetname "iqn.$(hostname).ssd3500"
 
49
        tgtadm --lld iser --mode target --op bind --tid 1 --initiator-address ALL
 
50
        tgtadm --lld iser --mode logicalunit --op new --tid 1 --lun 1 --backing-store /dev/disk/by-uuid/6eeffa6d-d61e-4157-8732-e1da39368325 --bstype aio
 
51
 
 
52
    Store current setup
 
53
         tgt-admin --dump > /etc/tgt/targets.conf
 
54
 
 
55
  tcm/lio
 
56
  =======
 
57
    - Most recent and actively developed solution. Selected for inclusion into the kernel.
 
58
    rDMA support is schedulled for integration in kernel 3.9.
 
59
    - I checked their git tree, there is no iSER as of 11.2012
 
60
 
 
61
  openiscsi
 
62
  =========
 
63
    iscsi_discovery 192.168.11.5 -t iser -f -l
 
64
        -f      - disable fallback to tcp
 
65
        -l      - immidiatelly login and get all the devices [better check first]
 
66
    
 
67
    logout from all nodes
 
68
            iscsiadm -m node -U all
 
69
 
 
70
  Performance
 
71
  ===========
 
72
    - There is multiple options affecting the performance of the system. 
 
73
    - LUN types: direct-store (RAW devices) or backing-store (files, etc.)
 
74
    - Backend (bs-type): rdwr (cached file access), aio (Kernel AIO), sg (Direct Access)
 
75
    - Write cache (write-cache): disabling is good idea for high speed streaming
 
76
    - Block Size (block-size): 512 - 4096 (target supports bigger sizes, but initiator not).
 
77
    With not standard size (not 512), the O_DIRECT access on the client is failing with
 
78
    errno 22.
 
79
    - Packet sizes (MaxRecvDataSegmentLength, MaxXmitDataSegmentLength, FirstBurstLength,
 
80
    MaxBurstLength) and on the client (node.conn[0].iscsi.MaxRecvDataSegmentLength, 
 
81
    node.session.iscsi.FirstBurstLength, node.session.iscsi.MaxBurstLength).
 
82
    If segment length are set bellow, the raid blocks size (strip * n_disk), the there is
 
83
    problems connecting to the target in the aio mode.
 
84
    - For high performance streaming we need: direct-store, aio backend (sg is not working
 
85
    for me, but aio gives really good speed), and big buffers
 
86
    - On the target side, the read ahead should be set to the strip size (in 512 blocks). It
 
87
    is also affects writting speed.
 
88
        blockdev --setra 65536 /dev/sdc
 
89
 
 
90
/etc/tgt/targets.conf:
 
91
    default-driver iser
 
92
 
 
93
    <target iqn.ipepdvcompute2.ssd3500>
 
94
    <direct-store /dev/disk/by-uuid/6eeffa6d-d61e-4157-8732-e1da39368325>
 
95
        bs-type aio
 
96
        MaxRecvDataSegmentLength 2097152
 
97
        MaxXmitDataSegmentLength 2097152
 
98
        FirstBurstLength 8388608
 
99
        MaxBurstLength 8388608
 
100
        block-size 512
 
101
        write-cache off
 
102
    </direct-strore>
 
103
</target>
 
104