To configure the iSCSI initiator on Ubuntu 10.10, do the following:
1. Install the initiator software if not already done: sudo apt-get install open-iscsi.
2. Edit the iscsi configuration file. It is located under /etc/iscsi
a. Set the startup to automatic by removing the comment from node.startup = automatic
b. Turn off the manual startup by placing a comment in front of node.startup = manual
3. Restart the initiator by executing sudo /etc/init.d/open-iscsi restart
4. Configure the iscsi target:
a. Execute iscsiadm -m discovery -t st -p <target_ip>. This will discover the target. It will create a configuration file under /etc/iscsi/nodes. THere will be a separte folder for each target and then for each interface.
b. If username and password are required by the target, edit the config files by executing the following series of commands:
iscsiadm -m node --targetname "iqn.2001-04.com.example:storage.lun1" --portal "<target_ip>:3260" --op=update --name node.session.auth.authmethod --value=CHAP
iscsiadm -m node --targetname "iqn.2001-04.com.example:storage.lun1" --portal "<target_ip>:3260" --op=update --name node.session.auth.username --value=someuser
iscsiadm -m node --targetname "iqn.2001-04.com.example:storage.lun1" --portal "<target_ip>:3260" --op=update --name node.session.auth.password --value=secret
5. Restart the initiator by executing sudo /etc/init.d/open-iscsi restart
You should now be connected to the target. Verify by executing fdisk -l. You should now see the disk. Using fdisk utilites partition as desired.
No comments:
Post a Comment