-
Notifications
You must be signed in to change notification settings - Fork 1
/
iscsi-initiator.txt
executable file
·59 lines (38 loc) · 2.1 KB
/
iscsi-initiator.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
apt-get install open-iscsi
systemctl restart iscsid open-iscsi
systemctl status -l iscsid
systemctl enable iscsid open-iscsi
=======================================================
====== No AUTH =====
iscsiadm -m discovery -t sendtargets -p 192.168.5.226
====== CHAP =========
sudo vim /etc/iscsi/iscsid.conf
...........
discovery.sendtargets.auth.authmethod = CHAP
discovery.sendtargets.auth.username = <CLIENT ID>
discovery.sendtargets.auth.password = <CLIENT ADDRESS>
...........
sudo systemctl restart iscsid open-iscsi
iscsiadm -m discovery -t sendtargets -p 192.168.5.226
=======================================================
=======================================================
====== No AUTH =====
iscsiadm -m node -T iqn.2017-02.iscsi.ertebat.kaveh:target00 -p 192.168.5.226 -o update --name node.session.auth.authmethod --value=None
====== CHAP =========
iscsiadm -m node -T iqn.2017-02.iscsi.ertebat.kaveh:target00 -p 192.168.5.226 -o update --name node.session.auth.authmethod --value=CHAP
iscsiadm -m node -T iqn.2017-02.iscsi.ertebat.kaveh:target00 -p 192.168.5.226 -o update --name node.session.auth.username --value=user
iscsiadm -m node -T iqn.2017-02.iscsi.ertebat.kaveh:target00 -p 192.168.5.226 -o update --name node.session.auth.password --value=pass
=====================================================
=======================================================
===== AUTOMATIC STARTUP =======
iscsiadm -m node -T iqn.2017-02.iscsi.ertebat.kaveh:target00 -p 192.168.5.226 -o update --name node.startup --value=automatic
====== MANUAL STARTUP ==========
iscsiadm -m node -T iqn.2017-02.iscsi.ertebat.kaveh:target00 -p 192.168.5.226 -o update --name node.startup --value=manual
=======================================================
iscsiadm -m node -o show
iscsiadm -m node -T iqn.2017-02.iscsi.ertebat.kaveh:target00 -p 192.168.5.226 --login
iscsiadm -m session -o show
iscsiadm -m session -o show -P 3
===================== TO DELETE =======================
iscsiadm -m node -p 192.168.5.226 -u
iscsiadm -m node -p 192.168.5.226 -o delete