Re: iSCSI does not create device in /dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan,

On Fri, 5 Jun 2015 16:57:08 +0200, Dan wrote :
> Via the targetcli utility, I set up a disk image file (in
> /backstores/fileio) and a target for it on a server machine 10.0.0.60.
> 
> This is the structure of my system:
> 
> o- / .........................................................................................................................
> [...]
>   o- backstores
> ..............................................................................................................
> [...]
>   | o- block ..................................................................................................
> [Storage Objects: 0]
>   | o- fileio .................................................................................................
> [Storage Objects: 1]
>   | | o- disk01
> ............................................................
> [/iscsi_disks/disk01.img (5.0GiB) write-back activated]
>   | o- pscsi ..................................................................................................
> [Storage Objects: 0]
>   | o- ramdisk ................................................................................................
> [Storage Objects: 0]
>   o- iscsi ............................................................................................................
> [Targets: 1]
>   | o- iqn.2015-06.com.foobar:target01
> ...................................................................................
> [TPGs: 1]
>   |   o- tpg1 ...............................................................................................
> [no-gen-acls, no-auth]
>   |     o- acls
> ..........................................................................................................
> [ACLs: 1]
>   |     | o- iqn.2015-06.com.foobar:www.test.com
> ..................................................................
> [Mapped LUNs: 1]
>   |     |   o- mapped_lun0
> ...............................................................................
> [lun0 fileio/disk01 (rw)]
>   |     o- luns
> ..........................................................................................................
> [LUNs: 1]
>   |     | o- lun0
> ........................................................................
> [fileio/disk01 (/iscsi_disks/disk01.img)]
>   |     o- portals
> ....................................................................................................
> [Portals: 1]
>   |       o- 0.0.0.0:3260
> .....................................................................................................
> [OK]
>   o- loopback .........................................................................................................
> [Targets: 0]
> 
> 
> From a client machine, I can correctly retrieve node information via the command
> 
> iscsiadm -m node --targetname "iqn.2015-06.com.foobar:target01"
> --portal "10.0.0.60:3260"

I don't see a "login" command. Usually what you do is:

1/ discover the target behind the portal
   # iscsiadm -m discovery -p 10.0.0.60 -t sendtargets
   (the result should be "iqn.2015-06.com.foobar:target01")

2/ login to the target
   # iscsiadm -m node \
     --targetname iqn.2015-06.com.foobar:target01 \
     --portal 10.0.0.60 \
     --login

Then you should see some new block devices under /dev. You can list
them with `lsscsi`.

Also be sure to correctly configure the ACLs for your iSCSI target. You
have two options :

1/ Explicitly set the list of initiators that can login to the target.
   To do that, you create a ACL under the target with `targetcli`. This
   is what you did with ACL "iqn.2015-06.com.foobar:www.test.com". The
   ACL should match the content of /etc/iscsi/initiatorname.iscsi on
   the initiator machine.

2/ Allow all initiators to login to the target. For that, you have to
   enable the "generate_node_acls" option in `targetcli` under "tpg1".

Option 1 is preferred but option 2 is easier for testing purposes.

Best regards,


> However, according to
> http://www.cyberciti.biz/tips/rhel-centos-fedora-linux-iscsi-howto.html
> now a device should appear in /dev (ready to be partitioned and
> mounted), and it doesn't.
> 
> On the client, /var/log/messages shows the following repeated error:
> 
> Jun  5 15:09:56 clientbox iscsid: Kernel reported iSCSI connection
> 15:0 error (1020 - ISCSI_ERR_TCP_CONN_CLOSE: TCP connection closed)
> state (1)
> Jun  5 15:09:58 clientbox kernel: [23008.710267]  connection15:0:
> detected conn error (1020)
> Jun  5 15:09:58 clientbox kernel: connection15:0: detected conn error (1020)
> Jun  5 15:09:58 clientbox iscsid: conn 0 login rejected: target error (03/01)
> 
> On the server, this is the status of the relevant services:
> 
> [root@localhost /]# service iscsi status
> Redirecting to /bin/systemctl status  iscsi.service
> iscsi.service - Login and scanning of iSCSI devices
>    Loaded: loaded (/usr/lib/systemd/system/iscsi.service; enabled)
>    Active: active (exited) since Fri 2015-06-05 14:13:23 CEST; 2h 34min ago
>      Docs: man:iscsid(8)
>            man:iscsiadm(8)
>   Process: 6591 ExecStart=/sbin/iscsiadm -m node --loginall=automatic
> (code=exited, status=21)
>   Process: 6585 ExecStart=/usr/libexec/iscsi-mark-root-nodes
> (code=exited, status=0/SUCCESS)
>  Main PID: 6591 (code=exited, status=21)
> Jun 05 14:13:23 localhost.localdomain iscsiadm[6591]: iscsiadm: No records found
> Jun 05 14:13:23 localhost.localdomain systemd[1]: Started Login and
> scanning of iSCSI devices.
> 
> [root@localhost /]# service iscsid status
> Redirecting to /bin/systemctl status  iscsid.service
> iscsid.service - Open-iSCSI
>    Loaded: loaded (/usr/lib/systemd/system/iscsid.service; enabled)
>    Active: active (running) since Fri 2015-06-05 14:13:26 CEST; 2h 34min ago
>      Docs: man:iscsid(8)
>            man:iscsiadm(8)
>   Process: 6605 ExecStop=/sbin/iscsiadm -k 0 2 (code=exited, status=0/SUCCESS)
>   Process: 6612 ExecStart=/usr/sbin/iscsid (code=exited, status=0/SUCCESS)
>  Main PID: 6614 (iscsid)
>    CGroup: /system.slice/iscsid.service
>            ├─6613 /usr/sbin/iscsid
>            ├─6614 /usr/sbin/iscsid
>            └─6615 /usr/sbin/iscsid
> Jun 05 16:47:49 localhost.localdomain iscsid[6613]: conn 0 login
> rejected: target error (03/01)
> Jun 05 16:47:49 localhost.localdomain iscsid[6613]: Kernel reported
> iSCSI connection 6:0 error (1020 - ISCSI_ERR_TCP_CONN_CLOSE: TCP
> connection closed) state (1)
> Jun 05 16:47:52 localhost.localdomain iscsid[6613]: conn 0 login
> rejected: target error (03/01)
> Jun 05 16:47:52 localhost.localdomain iscsid[6613]: Kernel reported
> iSCSI connection 6:0 error (1020 - ISCSI_ERR_TCP_CONN_CLOSE: TCP
> connection closed) state (1)
> Jun 05 16:47:54 localhost.localdomain iscsid[6613]: conn 0 login
> rejected: target error (03/01)
> Jun 05 16:47:55 localhost.localdomain iscsid[6613]: Kernel reported
> iSCSI connection 6:0 error (1020 - ISCSI_ERR_TCP_CONN_CLOSE: TCP
> connection closed) state (1)
> Jun 05 16:47:57 localhost.localdomain iscsid[6613]: conn 0 login
> rejected: target error (03/01)
> Jun 05 16:47:57 localhost.localdomain iscsid[6613]: Kernel reported
> iSCSI connection 6:0 error (1020 - ISCSI_ERR_TCP_CONN_CLOSE: TCP
> connection closed) state (1)
> Jun 05 16:48:00 localhost.localdomain iscsid[6613]: conn 0 login
> rejected: target error (03/01)
> Jun 05 16:48:00 localhost.localdomain iscsid[6613]: Kernel reported
> iSCSI connection 6:0 error (1020 - ISCSI_ERR_TCP_CONN_CLOSE: TCP
> connection closed) state (1)
> 
> 
> Any hint on what the problem is?  Google searches resulted in no
> useful information.
> 
> Thanks in advance.
> 
> 
> Dan
> --
> To unsubscribe from this list: send the line "unsubscribe target-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Christophe Vu-Brugier
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux