ISCSI server settings

Source: Internet
Author: User
ISCSI server settings-Linux Enterprise Application-Linux server application information. For more information, see the following section.
To install the ISCSI server, you must first download the software to your LINUX computer,
Then: tar-zxvf iscsitarget-1.4.20.1.tar.gz # attachment, the file is unzipped;
Then: cd iscsitarget-1.4.20.1
More README # see where it is.
As described in the README file
Make # This requires that gcc and make are correctly installed on your LINUX computer.
Make install
Configure the parameters of the iscsi software.
Vi/etc/ietd. conf
Find and modify the following content:
Target iqn.2001-04.com. example: storage. disk2.sys1. xyz # if there is a '#' before this line, remove it.
Lun 0 Path =/dev/hda2, Type = fileio # note that hda2 is a FAT partition on my computer. If you want to share it with WINDOWS, so it must be that WINSOWS can recognize other partitions !!! Remove the "#" in front of all the rows listed by me.
MaxConnections 1
MaxSessions 5
InitialR2T Yes
ImmediateData Yes
MaxRecvDataSegmentLength 8192
MaxXmitDataSegmentLength 8192
MaxBurstLength 262144
FirstBurstLength 65536
DefaultTime2Wait 2
DefaultTime2Retain 20
MaxOutstandingR2T 1
DataPDUInOrder Yes
DataSequenceInOrder Yes
ErrorRecoveryLevel 0
HeaderDigest None, CRC32C
DataDigest None, CRC32C
NOPInterval 0
Wthreads 8

Okay, the configuration is complete (basically available). Start iscsi-target below.
But before that, you 'd better turn off the firewall, which is the iptables,
How to close:/etc/init. d/iptables stop
Start iscsi-target:/etc/init. d/iscsi-target start
Then you can: netstat-tunlp # If no error occurs during make, you should see the following content:
Tcp 0 0 0.0.0.0: 3260 0.0.0.0: * LISTEN 3363/ietd
Tcp 0 0: 3260: * LISTEN 3363/ietd
3206 is the port enabled by our iscsi-target.
This means that your iscsi-target server will be started. Of course you may not be able to use it. You also need:
Tail/var/log/message # If you see the following content, congratulations.
May 1 23:53:51 linux kernel: iscsi_trgt: Removing all connections, sessions and targets
May 1 23:53:52 linux kernel: iSCSI Enterprise Target Software-version 1.4.20.1
May 1 23:53:52 linux kernel: iscsi_trgt: Registered io type fileio
May 1 23:53:52 linux kernel: iscsi_trgt: Registered io type blockio
May 1 23:53:52 linux kernel: iscsi_trgt: Registered io type nullio
May 1 23:53:52 linux ietd: initiators. deny is depreciated and will be obsoleted in the next release, please see README. initiators for more information
So there should be no problem.

Install WINDOWS client first
Download a Microsoft iSCSI Initiator installation.
Open and find the Discovery tag.
Click Add in the Target Portals column.
Enter the IP address of your LINUX server in the IP address or DNS name box and click OK.
Then select the Targets tab, click Refresh, and a message is displayed in the above box: ipn ****************** Status: Inactive.
Click the one, click Log On, and click OK. Open "my computer" and see what will happen
If not, click "my computer" and choose "manage"> "disk management. Just manage it.
If you can't do that, you can take a look at it. You can also use baidu.

Let's talk about the iscsi client in LINUX.
General LINUX with iscsi client, I use CentOS5.3 comes with iscsi-initiator-utils-6.2.0.868-0.18.el5 this stuff
Installation: rpm-ivh iscsi-initiator-utils-6.2.0.868-0.18.el5
Start:/etc/init. d/iscsi start # disable iptables first
Search: iscsiadm -- mode discovery -- type sendtargets -- portal 192.168.1.12 # My server address is 192.168.1.12
If successful, it will show: 192.168.1.12: 3260,1 iqn.2001-04.com. example: storage. disk2.sys1. xyz
Login: iscsiadm -- mode node -- targetname iqn.2001-04.com. example: storage. disk2.sys1. xyz -- portal 192.168.1.12: 3260 -- login
If it succeeds, it will display: Logging in to [iface: default, target: iqn.2001-04.com. example: storage. disk2.sys1. xyz, portal: 192.168.1.12, 3260]
Login to [iface: default, target: iqn.2001-04.com. example: storage. disk2.sys1. xyz, portal: 192.168.1.12, 3260]: successful
Then use fdisk-l to find an extra disk.
Finally: LOGOUT: iscsiadm -- mode node -- portal 192.168.1.12 -- logout
If successful, it will display: Logging out of session [sid: 3, target: iqn.2001-04.com. example: storage. disk2.sys1. xyz, portal: 192.168.1.12, 3260]
Logout of [sid: 3, target: iqn.2001-04.com. example: storage. disk2.sys1. xyz, portal: 192.168.1.12, 3260]: successful

If not, email me: mblzgz@163.com.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.