Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_config_iscsi [2019/11/01 09:41] andonovjlinux_config_iscsi [2019/11/07 00:25] (current) – external edit 127.0.0.1
Line 44: Line 44:
  
 ====Windows==== ====Windows====
-In Windows server, you can create it via the wizzard:+In Windows server, you can create it via the wizzard in the Server Manager and it should be something like this at the end: 
 + 
 +{{ :iscsitargerwindows.jpg?400 |}}
  
  
Line 149: 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 158: 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 268: Line 268:
 </sxh> </sxh>
  
 +That information is also available on:
 +/var/lib/iscsi/nodes/iqn
 +
 +<sxh bash>
 +[root@matar 10.200.15.30,3260,1]# pwd
 +/var/lib/iscsi/nodes/iqn.1991-05.com.microsoft:taurus-taurus-orabackup-target/10.200.15.30,3260,1
 +[root@matar 10.200.15.30,3260,1]# ls -lart
 +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,3260,1]#
 +</sxh>
 +
 +Once the Login was successfully, we can check where the OS mounted the device:
 +<sxh bash>
 +[root@matar 10.200.15.30,3260,1]# lsblk --scsi|grep LIO
 +sdf  3:0:0:   disk LIO-ORG  block1   4.0  iscsi
 +</sxh>
 +
 +Or you can just grep in the /var/log/messages
 +
 +<sxh bash>
 +[root@oraback log]# grep " Attached scsi disk" /var/log/messages
 +Nov  6 16:49:22 oraback kernel: sd 4:0:0:0: Attached scsi disk sdf
 +[root@oraback log]#
 +</sxh>
 +
 +Then we can create the file system:
 +
 +<sxh bash>
 +[root@matar 10.200.15.30,3260,1]# mkfs.ext4 -m0 /dev/sdf
 +[root@matar 10.200.15.30,3260,1]# blkid | grep sdf
 +/dev/sdf: UUID="6a1c44d0-3e2f-49fc-85ba-ced3e44bb5b0" TYPE="ext4"
 +</sxh>
 +
 +Add the following to the /etc/fstab:
 +
 +<sxh bash>
 +[root@matar 10.200.15.30,3260,1]# mkdir -p /mnt/block1
 +[root@matar 10.200.15.30,3260,1]# echo "UUID=6a1c44d0-3e2f-49fc-85ba-ced3e44bb5b0 /mnt/block1 ext4 _netdev 0 0" >> /etc/fstab
 +</sxh>
 +
 +And then we can mount the file system:
 +
 +<sxh bash>
 +[root@matar 10.200.15.30,3260,1]# mount /mnt/block1
 +[root@matar 10.200.15.30,3260,1]# df -h | grep block1
 +UUID=6a1c44d0-3e2f-49fc-85ba-ced3e44bb5b0   10.0G  9.9G  0.1G  1% /mnt/block1
 +</sxh>
  
 ===Logout=== ===Logout===
Line 277: Line 327:
 Logout of [sid: 16, target: iqn.1991-05.com.microsoft:taurus-taurus-orabackup-target, portal: iscsi_target_server_ip,3260] successful. Logout of [sid: 16, target: iqn.1991-05.com.microsoft:taurus-taurus-orabackup-target, portal: iscsi_target_server_ip,3260] successful.
 </sxh> </sxh>
 +
 +
  
 ===Delete configuration=== ===Delete configuration===
Line 296: Line 348:
 iscsiadm: No active sessions. iscsiadm: No active sessions.
 </sxh> </sxh>
 +
 +=====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: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT
 +2: eno16780032: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000
 +3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT
 +4: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN mode DEFAULT qlen 500
 +[root@server Logs]# ls -lart
 +</sxh>
 +
 +Here is a good article of how to speed up the performance of the iSCSI:
 +
 +https://www.monperrus.net/martin/performance+of+read-write+throughput+with+iscsi
  • linux_config_iscsi.1572601264.txt.gz
  • Last modified: 2019/11/01 17:41
  • (external edit)