QNAP, iSCSI and Ubuntu 12.04 server

From MyWiki

Jump to: navigation, search

Reference:
1) Configuring ISCSI with RHEL, Scientific Linux or CentOS 6
2) Ubuntu 12.04 LTS. Configuring iSCSI initiator
3) Highly Available iSCSI Target


Install iSCSI initiator first:

apt-get install open-iscsi

Make the following changes to /etc/iscsi/iscsid.conf

node.startup = automatic
node.session.auth.authmethod = CHAP
node.session.auth.username = user_name_on_QNAP_for_iSCSI_target
node.session.auth.password = user_password_on_QNAP_for_iSCSI_target

Run discovery of available targets, show target's status and login:

iscsiadm -m discovery -t st -p qnap_hostname_here 
iscsiadm -m node -o show
iscsiadm -m node --login

Check that you can see the newly attached SCSI device and check it out with frisk:

cat /proc/partitions
fdisk /dev/sdb


When I did the discovery for the first time I forgot to set authmethod, username and password in /etc/iscsi/iscsid.conf Discovery went through without a problem, but --login failed with:

iscsiadm: initiator reported error (19 - encountered non-retryable iSCSI login failure)

So, I cleaned things up first with:

iscsiadm -m discovery -t st -p qnap_hostname_here -o delete

And run discovery again.

Personal tools