エラー24でiSCSIログインが失敗する - すべてのポータルにログインできない

エラー24でiSCSIログインが失敗する - すべてのポータルにログインできない

iSCSIターゲットを設定しようとしています。

[root@localhost /]# targetcli
targetcli shell version 2.1.fb37
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.

/> cd backstores/fileio 
/backstores/fileio> create disk01 /iscsi_disks/disk01.img 5G
Created fileio disk01 with size 5368709120
/backstores/fileio> cd /iscsi 
/iscsi> create iqn.2015-06.world.server:storage.target01
Created target iqn.2015-06.world.server:storage.target01.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
/iscsi> cd iqn.2015-06.world.server:storage.target01/tpg1/luns
/iscsi/iqn.20...t01/tpg1/luns> create /backstores/fileio/disk01 
Created LUN 0.
/iscsi/iqn.20...t01/tpg1/luns> cd ../acls 
/iscsi/iqn.20...t01/tpg1/acls> create iqn.2015-06.world.server:www.server.world
Created Node ACL for iqn.2015-06.world.server:www.server.world
Created mapped LUN 0.
/iscsi/iqn.20...t01/tpg1/acls> cd iqn.2015-06.world.server:www.server.world/
/iscsi/iqn.20....server.world> set auth userid=foo
Parameter userid is now 'foo'.
/iscsi/iqn.20....server.world> set auth password=bar
Parameter password is now 'bar'.
/iscsi/iqn.20....server.world> exit
Global pref auto_save_on_exit=true
Last 10 configs saved in /etc/target/backup.
Configuration saved to /etc/target/saveconfig.json
[root@localhost /]# service iscsid restart
Redirecting to /bin/systemctl restart iscsid.service
[root@localhost /]# service iscsi restart
Redirecting to /bin/systemctl restart iscsi.service

構造は次のとおりです(全体のサイズを表示するには、新しいウィンドウで画像を開きます)。

ここに画像の説明を入力してください。

検索が正常に動作しているようです。

[root@linuxbox ~]# iscsiadm -m discovery -t sendtargets -p 10.0.0.60
10.0.0.60:3260,1 iqn.2015-06.world.server:storage.target01

ただし、接続しようとすると、次の認証失敗メッセージが表示されます。

[root@linuxbox ~]# iscsiadm -m node --targetname "iqn.2015-06.world.server:storage.target01" --portal "10.0.0.60:3260" --login 
Logging in to [iface: default, target: iqn.2015-06.world.server:storage.target01, portal: 10.0.0.60,3260] (multiple)
iscsiadm: Could not login to [iface: default, target: iqn.2015-06.world.server:storage.target01, portal: 10.0.0.60,3260].
iscsiadm: initiator reported error (24 - iSCSI login failed due to authorization failure)
iscsiadm: Could not log into all portals

ベストアンサー1

私の場合、ランチャーのiqnに問題がありました。ファイルを編集し/etc/iscsi/initiatorname.iscsiて実行しましたが、まだターゲットにservice iscsi restart エラーが表示されました。/etc/messages

Dec  2 14:51:05 iscsi-target-vm kernel: iSCSI Initiator Node: iqn.1994-05.com.redhat:47fbcf58e10 is not authorized to access iSCSI target portal group: 1.

12月2日14:51:05 iscsi-target-vmカーネル:iSCSIログインネゴシエーションが失敗しました。 `

したがって、解決策はservice iscsid restartランチャーで実行してiqnを再ロードすることです。

おすすめ記事