Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_config_iscsi [2019/10/30 15:15] – andonovj | linux_config_iscsi [2019/11/07 00:25] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
======iSCSI Configuration====== | ======iSCSI Configuration====== | ||
- | |||
- | |||
The configure iSCSI you have to configure the following components: | The configure iSCSI you have to configure the following components: | ||
Line 43: | Line 41: | ||
So the connection will be initiated by the iSCSI initiator (on the client machine) -> iSCSI Target (on the server machine, over Internet) -> LUN (at the storage level) | So the connection will be initiated by the iSCSI initiator (on the client machine) -> iSCSI Target (on the server machine, over Internet) -> LUN (at the storage level) | ||
+ | |||
+ | |||
+ | ====Windows==== | ||
+ | In Windows server, you can create it via the wizzard in the Server Manager and it should be something like this at the end: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | |||
+ | |||
=====iSCSI Initiator===== | =====iSCSI Initiator===== | ||
Line 92: | Line 99: | ||
===CHAP=== | ===CHAP=== | ||
Chap protection might or might not be enabled on the target server. If CHAP is configured on the iSCSI target, we have to configure it in the initiator. | Chap protection might or might not be enabled on the target server. If CHAP is configured on the iSCSI target, we have to configure it in the initiator. | ||
- | BE CAREFUL TO CONFIGURE ONLY THE INITIATOR PART OR YOU WILL HAVE this error: "The challenge was incorrect." | + | |
+ | **BE CAREFUL TO CONFIGURE ONLY THE INITIATOR PART OR YOU WILL HAVE this error: "The challenge was incorrect." | ||
+ | ** | ||
The configuration is done in the: | The configuration is done in the: | ||
Line 142: | Line 151: | ||
===Login=== | ===Login=== | ||
We can login to the iSCSI target and start a session as follows: | We can login to the iSCSI target and start a session as follows: | ||
- | |||
<sxh bash> | <sxh bash> | ||
Line 151: | Line 159: | ||
You can also list the current setting for the initiator and target as follows: | You can also list the current setting for the initiator and target as follows: | ||
- | |||
<sxh bash> | <sxh bash> | ||
Line 261: | Line 268: | ||
</ | </ | ||
+ | That information is also available on: | ||
+ | / | ||
+ | |||
+ | <sxh bash> | ||
+ | [root@matar 10.200.15.30, | ||
+ | / | ||
+ | [root@matar 10.200.15.30, | ||
+ | total 4 | ||
+ | -rw------- 1 root root 2155 Nov 1 12:40 default | ||
+ | drw------- 3 root root 32 Nov 1 12:40 .. | ||
+ | drw------- 2 root root 20 Nov 1 12:40 . | ||
+ | [root@matar 10.200.15.30, | ||
+ | </ | ||
+ | |||
+ | Once the Login was successfully, | ||
+ | <sxh bash> | ||
+ | [root@matar 10.200.15.30, | ||
+ | sdf 3: | ||
+ | </ | ||
+ | |||
+ | Or you can just grep in the / | ||
+ | |||
+ | <sxh bash> | ||
+ | [root@oraback log]# grep " Attached scsi disk" / | ||
+ | Nov 6 16:49:22 oraback kernel: sd 4:0:0:0: Attached scsi disk sdf | ||
+ | [root@oraback log]# | ||
+ | </ | ||
+ | |||
+ | Then we can create the file system: | ||
+ | |||
+ | <sxh bash> | ||
+ | [root@matar 10.200.15.30, | ||
+ | [root@matar 10.200.15.30, | ||
+ | /dev/sdf: UUID=" | ||
+ | </ | ||
+ | |||
+ | Add the following to the /etc/fstab: | ||
+ | |||
+ | <sxh bash> | ||
+ | [root@matar 10.200.15.30, | ||
+ | [root@matar 10.200.15.30, | ||
+ | </ | ||
+ | |||
+ | And then we can mount the file system: | ||
+ | |||
+ | <sxh bash> | ||
+ | [root@matar 10.200.15.30, | ||
+ | [root@matar 10.200.15.30, | ||
+ | UUID=6a1c44d0-3e2f-49fc-85ba-ced3e44bb5b0 | ||
+ | </ | ||
===Logout=== | ===Logout=== | ||
Line 270: | Line 327: | ||
Logout of [sid: 16, target: iqn.1991-05.com.microsoft: | Logout of [sid: 16, target: iqn.1991-05.com.microsoft: | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===Delete configuration=== | ||
+ | To deleting a configuration, | ||
+ | |||
+ | - Disconnect/ | ||
+ | - Ensure that the driver won't try to re-connect | ||
+ | |||
+ | ==Logout== | ||
+ | <sxh bash> | ||
+ | [root@matar ~]# iscsiadm --mode node --targetname iqn.1991-05.com.microsoft: | ||
+ | Logging out of session [sid: 20, target: iqn.1991-05.com.microsoft: | ||
+ | </ | ||
+ | |||
+ | ==Delete== | ||
+ | <sxh bash> | ||
+ | [root@matar ~]# iscsiadm -m node -o delete -T iqn.1991-05.com.microsoft: | ||
+ | [root@matar ~]# iscsiadm -m session | ||
+ | iscsiadm: No active sessions. | ||
+ | </ | ||
+ | |||
+ | =====Performance===== | ||
+ | I've found that iSCSI isn't particulary fast. I've found that my environment isn't so much loaded. That can be because the clients aren't using Jumbo frames so that might be the reson. | ||
+ | |||
+ | <sxh bash> | ||
+ | [root@server Logs]# ip link show | grep mtu | ||
+ | 1: lo: < | ||
+ | 2: eno16780032: | ||
+ | 3: virbr0: < | ||
+ | 4: virbr0-nic: < | ||
+ | [root@server Logs]# ls -lart | ||
+ | </ | ||
+ | |||
+ | Here is a good article of how to speed up the performance of the iSCSI: | ||
+ | |||
+ | https:// |