ISCSIInitiator in different operating systems

Source: Internet
Author: User
ISCSIInitiator-Linux Enterprise Application-Linux server application information under different operating systems. The following is a detailed description. 1. windows
Available for windows2000, windowsXP, windows2003 later versions of iscsi-initiator program is Initiator-2.04-build3273
After the installation is successful, the Microsoft iSCSI Initiator Program Group is created, and corresponding icons are displayed on the desktop. The basic operations are as follows:
Click Microsoft iSCSI Initiator-> Discovery-> Add-> enter the target IP address and port number.
Click Microsoft iSCSI Initiator-> Targets-> Refresh to find the currently available Target
Click Microsoft iSCSI Initiator-> Targets-> select target-> Logon-> OK to establish a connection.
Click Control Panel> Administrative Tools> Computer Management> disk management to view the Logical Disk mapped to the local machine. Then, you can format partitions like local disks.
Click Microsoft iSCSI Initiator-> Targets-> select target-> Details-> check the corresponding task item-> Logoff to disconnect.

2. RedHat restart is Linux 5
Download the initiatorsoftware package open-iscsi-2.0.865.tar.gz to the/root directory.
Usage: Decompress the software
[Root @ RedHat5 ~] # Tar xvzf Open-iscsi-2.0.865.tar.gz
Generate a directory Open-iscsi-2.0.86 under/root to enter the directory for compilation and Installation
[Root @ RedHat5 ~] # Cd Open-iscsi-2.0.86
[Root @ RedHat5 Open-iscsi-2.0.86] # make
[Root @ RedHat5 Open-iscsi-2.0.86] # make install
[Root @ RedHat5 Open-iscsi-2.0.86] # cd ~
After compilation and installation, generate necessary driver modules, daemon, and management program iscsiadm
Usage
Start Open-iscsi
[Root @ RedHat5 ~] # Service open-iscsi start
If you want to automatically load the instance when it starts, run the following command:
[Root @ RedHat5 ~] # Chkconfig -- level 3 open-iscsi on
The parameter 3 here is the running level, and the graphic interface needs to be changed to 5.
Target found, ask target name
[Root @ RedHat5 ~] # Iscsiadm-m discovery-t sendtargets-p targetIP address: Port Number
This command will report the target name
Establish a connection
After obtaining the target name, run the following command to establish a connection:
[Root @ RedHat5 ~] # Iscsiadm-m node-T target name-p targetIP address: port number -- login
In this case, you should see the Logical Disk name mapped to, and use fdisk-l to see details about the Logical Disk, you can partition, create a file system, attach, and detach a local hard disk.
Disconnect
If the Logical Disk has been attached, unmount the disk before disconnecting it. Then run the following command:
[Root @ RedHat5 ~] # Iscsiadm-m node-T target name-p targetIP address: port number -- logout
The Logical Disk should be correctly detached and disconnected before shutdown. Otherwise, a zombie process will be left on the target server, resulting in a waste of server resources.

3. Fedora core 6 and Fedora 7
Both operating systems have rpm packages available, for Fedora core 6 is a iscsi-initiator-utils-6.20.695-0.5.i386.rpm, for Fedora 7 is a iscsi-initiator-utils-6.20.754-0.0.fc7.i386.rpm, download the corresponding file and install it with the rpm command.
[Federa] # rpm-ivh iscsi-initiator-utils-6.20.754-0.0.fc7.i386.rpm
Usage
These two rpm packages are actually the Open-iscsi software mentioned above, and their management program is also iscsiadm, Which is used exactly the same as above. However, the startup script files generated by different installation methods are different. The following method is required:
Load the kernel module
[Federa] # modprobe-q iscsi_tcp
Start the daemon process
[Federa] # iscsid
Then you can use the iscsiadm program for Management. The target information is stored in the database. The module is automatically loaded and the daemon process is started at the next startup. To delete information about a target from a database, run the following command:
Query database content
[Federa] # iscsiadm-m node
Deletes a specified target.
[Federa] # iscsiadm-m node-o delete-T target name-p targetIP address: Port Number

4. FreeBSD5.4, FreeBSD6.2
Install software
Download initiatorsoftware iscsi-12.tar.bz2 to/root from the rootid authentication system.
Decompression Software
# Tar xvzf iscsi-12.tar.bz
The system and iscontrol directories are obtained.
Go to these two directories for compilation:
# Cd sys/modules/iscsi_initiator
# Ln-s ../..@
# Make
After compilation is successful, the kernel module File iscsi_initiator.ko is generated under this directory and copied to the/boot/kernel directory.
# Cd iscontrol
# Make
After compilation is successful, the management program iscontrol is generated in this directory, and the file is copied to the/sbin directory.
Usage
First load the kernel module
# Kldload iscsi_initiator.ko
If you do not want to see a lot of output information
# Sysctl debug. iscsi = 0
Target found, ask target name
# Iscontrol-d targetaddress = targetIP address
This command will report the target name.
Connect to target
# Iscontrol targetaddress = target's IP address TargetName = target name
The target name is the name reported by the target command.
After the connection is successful, it will report the scsi device name mapped to the local machine, such as da0 or da1.
The command and connection command of the kernel module should be written into the startup script file/etc/rc. local, so that the machine can automatically establish a connection at startup.
Run the following command to view the connected device.
# Camcontrol devlist
Then, you can partition, create a file system, mount, and detach a local hard disk.
To end the connection, first uninstall the corresponding device, and then send a-HUP signal to the iscontrol process, or use top to locate the iscontrol process number and kill it directly.
When the software is restored after the target service is interrupted (for example, restarting the machine), the connection cannot be established automatically and the connection must be established manually. The software does not support authentication, and the target end cannot set a password.

5. Open Solaris
The Open Solaris operating system has a built-in iSCSI Initiator, whose management program name is also iscsiadm, but it is not the same program as the iscsiadm in Linux, and the syntax is also different.
Usage:
Log on as root, start a terminal window, and execute the following command in the window:
Target found, ask target name
# Iscsiadm add discovery-address targetIP address: Port Number
Establish a connection
# Iscsiadm modify discovery-t enable
View Logical Disk name
# Format
Format, create a file system, and mount the Logical Disk according to its name (for example, c1t0d0.
Disconnect
# Iscsiadm modify discovery-t disable
Delete a target
# Iscsiadm remove discovery-address targetIP address: Port Number

Original in: http://iscsidiy.kmip.net
Related Article

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.