using_the_linux_iscsi_software_initiator
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | using_the_linux_iscsi_software_initiator [2010/12/03 23:31] (current) – created tkbletsc | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Using the Linux iSCSI software initiator ====== | ||
+ | |||
+ | ===== Requirements ===== | ||
+ | You'll need: | ||
+ | * An iSCSI-enabled kernel (or kernel modules). | ||
+ | * Userland tools from the " | ||
+ | |||
+ | ===== Overview ===== | ||
+ | There are two halves to the iSCSI software initiator: | ||
+ | - Kernel parts, which do "read block", | ||
+ | - Userland parts: administration, | ||
+ | |||
+ | Basically, the process of mounting a LUN works as follows: | ||
+ | - In userland, " | ||
+ | - In userland, " | ||
+ | - Mess with device as normal. | ||
+ | |||
+ | ===== Procedure ===== | ||
+ | * Install package " | ||
+ | |||
+ | $ sudo apt-get install open-iscsi | ||
+ | |||
+ | * Check/set iSCSI initiator name. This may be in '''/ | ||
+ | |||
+ | $ sudo YourEditorOfChoice / | ||
+ | |||
+ | * Load the modules & start the iscsid service. | ||
+ | |||
+ | In RedHat: | ||
+ | |||
+ | $ sudo service open-iscsi start | ||
+ | |||
+ | Elsewhere: | ||
+ | |||
+ | $ sudo / | ||
+ | |||
+ | This makes dmesg say: | ||
+ | |||
+ | Loading iSCSI transport class v2.0-724. | ||
+ | iscsi: registered transport (tcp) | ||
+ | iscsi: registered transport (iser) | ||
+ | |||
+ | * Associate given initiator with an iGroup and LUN on the filer. | ||
+ | |||
+ | * Perform iSCSI discovery to populate your config files: | ||
+ | |||
+ | $ iscsiadm -m discovery -t sendtargets -p 10.60.118.14: | ||
+ | 10.60.118.14: | ||
+ | |||
+ | * "Log in" to the filer to attach the LUN: | ||
+ | |||
+ | $ iscsiadm -m node -T iqn.1992-08.com.netapp: | ||
+ | |||
+ | This makes dmesg say: | ||
+ | |||
+ | scsi4 : iSCSI Initiator over TCP/IP | ||
+ | scsi 4:0:0:0: Direct-Access | ||
+ | SCSI device sdb: 16777216 512-byte hdwr sectors (8590 MB) | ||
+ | sdb: Write Protect is off | ||
+ | sdb: Mode Sense: bd 00 00 08 | ||
+ | SCSI device sdb: write cache: disabled, read cache: enabled, doesn' | ||
+ | SCSI device sdb: 16777216 512-byte hdwr sectors (8590 MB) | ||
+ | sdb: Write Protect is off | ||
+ | sdb: Mode Sense: bd 00 00 08 | ||
+ | SCSI device sdb: write cache: disabled, read cache: enabled, doesn' | ||
+ | sdb: sdb1 sdb2 | ||
+ | sd 4:0:0:0: Attached scsi disk sdb | ||
+ | sd 4:0:0:0: Attached scsi generic sg1 type 0 | ||
+ | |||
+ | * The LUN is now treated like a local SCSI drive, so we can do things like: | ||
+ | |||
+ | $ fdisk /dev/sdb | ||
+ | $ mount /dev/sdb2 /mnt/mylun | ||
+ | |||
+ | * Optional - make the iSCSI login occur automatically at boot: | ||
+ | * First, make our LUN be attached whenever the iscsid service is started: | ||
+ | * Edit / | ||
+ | * Change " | ||
+ | * Second, make the iscsi service load at boot. For Ubuntu, run " | ||
+ | |||
+ | $ chkconfig --level < |
using_the_linux_iscsi_software_initiator.txt · Last modified: by tkbletsc