NetBSD-Users archive

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

iSCSI initiator testing in 6.0BETA2



Gentlemen,

First of all, I have no idea whether what I'm trying to do is fully
supported or not: I'm testing the new iSCSI initiator on a non-NetBSD
target (this box: http://web.qnap.com/pro_detail_software.asp?p_id=134).
Is this supposed to work yet? I have had it actually working for some
time, but until I decided to stress-test it, I haven't got anything back
from it. I'm describing below what I have done.

Using the snapshot from July the 8th, I have build a domU kernel with
iSCSI support (my target NAS being in a remote location, I can't afford
to try this with a GENERIC kernel). Then, I followed the example session
described in iscsictl(8) manpage. Everything seemed to be fine, I could
disklabel my new disk, newfs it, mount it, and I started to untar the
latest pkgsrc source and build packages. At some point, I was surprised
to find a file in both its intended location and a child directory, but
didn't really pay attention. Once I had the sysbench package build and
installed, I started using it to stress the file i/o of the iSCSI disk.

This worked for ... some time. The first few tests were successful, but
at some point, I could only get "Input/output error" as the result of
any command related to my iSCSI disk. The system wouldn't create a file
or even just unmount the partition. Rebooting and trying to re-newfs the
partition didn't work either, re-disklabeling the disk made no
difference.  Since then, I have updated the NAS firmware, I have upgraded
my initiator to the July 12th snapshot, and I'm now trying erase and
recreate the LUNs and targets.

If that can be of any help to diagnose my problem, below is the output
of any action taken (on the July 12th snapshot) to re-disklabel or
re-newfs the partition and get it mounted again. On the left is the
output on the initiator (169.254.200.5) and quoted with ">    " is the
corresponding output of dmesg on the target (169.254.200.100). Has
anyone an idea on what I'm doing wrong?

Best regards,

-- 
Étienne



netbsd6# iscsictl add_send_target -a 169.254.200.100
Added Send Target 1
netbsd6# iscsictl refresh_targets
OK

>    [123129.140000] Received iSCSI login request from 169.254.200.5 on TCP 
> Network Portal 169.254.200.100:3260
>    [123129.140000] 
> ------------------------------------------------------------------
>    [123129.140000] AuthMethod:                   None
>    [123129.140000] HeaderDigest:                 None
>    [123129.140000] DataDigest:                   None
>    [123129.140000] MaxRecvDataSegmentLength:     65536
>    [123129.140000] 
> ------------------------------------------------------------------
>    [123129.140000] 
> ------------------------------------------------------------------
>    [123129.140000] InitiatorName:                
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123129.140000] TargetAlias:                  QNAP Target
>    [123129.140000] InitiatorAlias:               netbsd6.localnet
>    [123129.140000] TargetPortalGroupTag:         1
>    [123129.140000] InitialR2T:                   Yes
>    [123129.140000] ImmediateData:                Yes
>    [123129.140000] ErrorRecoveryLevel:           0
>    [123129.140000] SessionType:                  Discovery
>    [123129.140000] 
> ------------------------------------------------------------------
>    [123129.140000] TARGET_CORE[iSCSI]: Registered fabric_sess_ptr: c1fddde0
>    [123129.140000] iSCSI Login successful on CID: 1 from 169.254.200.5 to 
> 169.254.200.100:3260,1
>    [123129.140000] Incremented iSCSI Connection count to 1 from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123129.140000] Established iSCSI session from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123129.140000] Incremented number of active iSCSI sessions to 1 on iSCSI 
> Target Portal Group: 1
>    [123129.140000] Decremented iSCSI connection count to 0 from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123129.140000] TARGET_CORE[iSCSI]: Deregistered fabric_sess
>    [123129.140000] Released iSCSI session from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123129.140000] Decremented number of active iSCSI Sessions on iSCSI TPG: 
> 1 to 0

netbsd6# iscsictl list_targets
     1: iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
             2: 169.254.100.100:3260,1
             3: 169.254.200.100:3260,1
     4: iqn.2004-04.com.qnap:ts-410:iscsi.target02.c4e22a
             5: 169.254.100.100:3260,1
             6: 169.254.200.100:3260,1
netbsd6# iscsictl login -P 3   
Created Session 2, Connection 1

>    [123325.430000] Received iSCSI login request from 169.254.200.5 on TCP 
> Network Portal 169.254.200.100:3260
>    [123325.430000] Located Storage Object: 
> iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
>    [123325.430000] Located Portal Group Object: 1
>    [123325.430000] TARGET_CORE[iSCSI]->TPG[1]_LUN[0] - Copying READ-WRITE 
> access for LUN
>    [123325.430000] TARGET_CORE[iSCSI]->TPG[1]_LUN[1] - Copying READ-WRITE 
> access for LUN
>    [123325.430000] iSCSI_TPG[1] - Added DYNAMIC ACL with TCQ Depth: 16 for 
> iSCSI Initiator Node: iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123325.430000] 
> ------------------------------------------------------------------
>    [123325.430000] AuthMethod:                   None
>    [123325.430000] HeaderDigest:                 None
>    [123325.430000] DataDigest:                   None
>    [123325.430000] MaxRecvDataSegmentLength:     65536
>    [123325.430000] 
> ------------------------------------------------------------------
>    [123325.430000] 
> ------------------------------------------------------------------
>    [123325.430000] TargetName:                   
> iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
>    [123325.430000] InitiatorName:                
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123325.430000] TargetAlias:                  QNAP Target
>    [123325.430000] InitiatorAlias:               netbsd6.localnet
>    [123325.430000] TargetPortalGroupTag:         1
>    [123325.430000] InitialR2T:                   Yes
>    [123325.430000] ImmediateData:                Yes
>    [123325.430000] ErrorRecoveryLevel:           0
>    [123325.430000] SessionType:                  Normal
>    [123325.430000] 
> ------------------------------------------------------------------
>    [123325.430000] TARGET_CORE[iSCSI]: Registered fabric_sess_ptr: c1e05e00
>    [123325.430000] iSCSI Login successful on CID: 1 from 169.254.200.5 to 
> 169.254.200.100:3260,1
>    [123325.430000] Incremented iSCSI Connection count to 1 from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123325.430000] Established iSCSI session from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123325.430000] Incremented number of active iSCSI sessions to 1 on iSCSI 
> Target Portal Group: 1
>    [123325.430000] Got Unknown Mode Page: 0x04
>    [123325.430000] Got Unknown Mode Page: 0x04
>    [123325.450000] Got Unknown Mode Page: 0x05
>    [123325.450000] Got Unknown Mode Page: 0x05
>    [123325.450000] Got Unknown Mode Page: 0x04
>    [123325.450000] Got Unknown Mode Page: 0x04
>    [123325.450000] Got Unknown Mode Page: 0x05
>    [123325.450000] Got Unknown Mode Page: 0x05
>    [123325.450000] TARGET_CORE[iSCSI]: Detected NON_EXISTENT_LUN Access for 
> 0x00000002

netbsd6# iscsictl list_sessions
Session 2: Target iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
netbsd6# disklabel sd0
# /dev/rsd0d:
type: SCSI
disk: iSCSI Storage
label: fictitious
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 368640
total sectors: 754974721
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  24576000         0     4.2BSD      0     0     0  # (Cyl.      0 -  11999)
  d: 754974721         0     unused      0     0        # (Cyl.      0 - 
368640*)

>    [123562.690000] Got Unknown Mode Page: 0x04
>    [123562.690000] Got Unknown Mode Page: 0x04
>    [123562.690000] Got Unknown Mode Page: 0x05
>    [123562.690000] Got Unknown Mode Page: 0x05

netbsd6# disklabel -i sd0
partition> P
16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  24576000         0     4.2BSD      0     0     0  # (Cyl.      0 -  11999)
  d: 754974721         0     unused      0     0        # (Cyl.      0 - 
368640*)
partition> a
Filesystem type [?] [unused]: 
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: 
Partition size ('$' for all remaining) [12000c, 24576000s, 12000M]: 0
partition> P
16 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 d: 754974721         0     unused      0     0        # (Cyl.      0 - 368640*)
partition> a
Filesystem type [?] [unused]: 4.2BSD
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: 
Partition size ('$' for all remaining) [0c, 0s, 0M]: 16000M
 a:  32768000         0     4.2BSD      0     0     0  # (Cyl.      0 -  15999)
partition> W
Label disk [n]? y
disklabel: ioctl DIOCWDINFO: Input/output error
Label not written
partition>

>    [123773.110000] iscsi_handle_scsi_cmd:1561: ***ERROR*** DataSegmentLength: 
> 1536 is greater than FirstBurstLength: 0, protocol error.
>    [123773.110000] Decremented iSCSI connection count to 0 from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123773.110000] TARGET_CORE[iSCSI]: Deregistered fabric_sess
>    [123773.110000] Released iSCSI session from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123773.110000] Decremented number of active iSCSI Sessions on iSCSI TPG: 
> 1 to 0
>    [123775.100000] Received iSCSI login request from 169.254.200.5 on TCP 
> Network Portal 169.254.200.100:3260
>    [123775.100000] Located Storage Object: 
> iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
>    [123775.100000] Located Portal Group Object: 1
>    [123775.100000] TARGET_CORE[iSCSI]->TPG[1]_LUN[0] - Copying READ-WRITE 
> access for LUN
>    [123775.100000] TARGET_CORE[iSCSI]->TPG[1]_LUN[1] - Copying READ-WRITE 
> access for LUN
>    [123775.100000] iSCSI_TPG[1] - Added DYNAMIC ACL with TCQ Depth: 16 for 
> iSCSI Initiator Node: iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123775.120000] 
> ------------------------------------------------------------------
>    [123775.120000] AuthMethod:                   None
>    [123775.120000] HeaderDigest:                 None
>    [123775.120000] DataDigest:                   None
>    [123775.120000] MaxRecvDataSegmentLength:     65536
>    [123775.120000] 
> ------------------------------------------------------------------
>    [123775.120000] 
> ------------------------------------------------------------------
>    [123775.120000] TargetName:                   
> iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
>    [123775.120000] InitiatorName:                
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123775.120000] TargetAlias:                  QNAP Target
>    [123775.120000] InitiatorAlias:               netbsd6.localnet
>    [123775.120000] TargetPortalGroupTag:         1
>    [123775.120000] InitialR2T:                   Yes
>    [123775.120000] ImmediateData:                Yes
>    [123775.120000] ErrorRecoveryLevel:           0
>    [123775.120000] SessionType:                  Normal
>    [123775.120000] 
> ----------------------------------------------------------------
--
>    [123775.120000] TARGET_CORE[iSCSI]: Registered fabric_sess_ptr: ce3f3e20
>    [123775.120000] iSCSI Login successful on CID: 1 from 169.254.200.5 to 
> 169.254.200.100:3260,1
>    [123775.120000] Incremented iSCSI Connection count to 1 from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123775.120000] Established iSCSI session from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123775.120000] Incremented number of active iSCSI sessions to 1 on iSCSI 
> Target Portal Group: 1
>    [123780.110000] Decremented iSCSI connection count to 0 from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123780.110000] TARGET_CORE[iSCSI]: Deregistered fabric_sess
>    [123780.110000] Released iSCSI session from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123780.110000] Decremented number of active iSCSI Sessions on iSCSI TPG: 
> 1 to 0
>    [123782.100000] Received iSCSI login request from 169.254.200.5 on TCP 
> Network Portal 169.254.200.100:3260
>    [123782.100000] Located Storage Object: 
> iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
>    [123782.100000] Located Portal Group Object: 1
>    [123782.100000] TARGET_CORE[iSCSI]->TPG[1]_LUN[0] - Copying READ-WRITE 
> access for LUN
>    [123782.100000] TARGET_CORE[iSCSI]->TPG[1]_LUN[1] - Copying READ-WRITE 
> access for LUN
>    [123782.100000] iSCSI_TPG[1] - Added DYNAMIC ACL with TCQ Depth: 16 for 
> iSCSI Initiator Node: iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123782.120000] 
> ------------------------------------------------------------------
>    [123782.120000] AuthMethod:                   None
>    [123782.120000] HeaderDigest:                 None
>    [123782.120000] DataDigest:                   None
>    [123782.120000] MaxRecvDataSegmentLength:     65536
>    [123782.120000] 
> ------------------------------------------------------------------
>    [123782.120000] 
> ------------------------------------------------------------------
>    [123782.120000] TargetName:                   
> iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
>    [123782.120000] InitiatorName:                
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123782.120000] TargetAlias:                  QNAP Target
>    [123782.120000] InitiatorAlias:               netbsd6.localnet
>    [123782.120000] TargetPortalGroupTag:         1
>    [123782.120000] InitialR2T:                   Yes
>    [123782.120000] ImmediateData:                Yes
>    [123782.120000] ErrorRecoveryLevel:           0
>    [123782.120000] SessionType:                  Normal
>    [123782.120000] 
> ------------------------------------------------------------------
>    [123782.120000] TARGET_CORE[iSCSI]: Registered fabric_sess_ptr: cc7f4e40
>    [123782.120000] iSCSI Login successful on CID: 1 from 169.254.200.5 to 
> 169.254.200.100:3260,1
>    [123782.120000] Incremented iSCSI Connection count to 1 from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123782.120000] Established iSCSI session from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [123782.120000] Incremented number of active iSCSI sessions to 1 on iSCSI 
> Target Portal Group: 1

netbsd6# newfs sd0a
/dev/rsd0a: 16000.0MB (32768000 sectors) block size 16384, fragment size 2048
        using 87 cylinder groups of 183.92MB, 11771 blks, 23296 inodes.
wtfs: write error for sector 32767999: Input/output error

>    [124504.140000] iscsi_handle_scsi_cmd:1561: ***ERROR*** DataSegmentLength: 
> 512 is greater than FirstBurstLength: 0, protocol error.
>    [124504.140000] Decremented iSCSI connection count to 0 from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124504.140000] TARGET_CORE[iSCSI]: Deregistered fabric_sess
>    [124504.140000] Released iSCSI session from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124504.140000] Decremented number of active iSCSI Sessions on iSCSI TPG: 
> 1 to 0
>    [124506.130000] Received iSCSI login request from 169.254.200.5 on TCP 
> Network Portal 169.254.200.100:3260
>    [124506.130000] Located Storage Object: 
> iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
>    [124506.130000] Located Portal Group Object: 1
>    [124506.130000] TARGET_CORE[iSCSI]->TPG[1]_LUN[0] - Copying READ-WRITE 
> access for LUN
>    [124506.130000] TARGET_CORE[iSCSI]->TPG[1]_LUN[1] - Copying READ-WRITE 
> access for LUN
>    [124506.130000] iSCSI_TPG[1] - Added DYNAMIC ACL with TCQ Depth: 16 for 
> iSCSI Initiator Node: iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124506.130000] 
> ------------------------------------------------------------------
>    [124506.130000] AuthMethod:                   None
>    [124506.130000] HeaderDigest:                 None
>    [124506.130000] DataDigest:                   None
>    [124506.130000] MaxRecvDataSegmentLength:     65536
>    [124506.130000] 
> ------------------------------------------------------------------
>    [124506.130000] 
> ------------------------------------------------------------------
>    [124506.130000] TargetName:                   
> iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
>    [124506.130000] InitiatorName:                
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124506.130000] TargetAlias:                  QNAP Target
>    [124506.130000] InitiatorAlias:               netbsd6.localnet
>    [124506.130000] TargetPortalGroupTag:         1
>    [124506.130000] InitialR2T:                   Yes
>    [124506.130000] ImmediateData:                Yes
>    [124506.130000] ErrorRecoveryLevel:           0
>    [124506.130000] SessionType:                  Normal
>    [124506.130000] 
> ------------------------------------------------------------------
>    [124506.130000] TARGET_CORE[iSCSI]: Registered fabric_sess_ptr: cc7f4e60
>    [124506.130000] iSCSI Login successful on CID: 1 from 169.254.200.5 to 
> 169.254.200.100:3260,1
>    [124506.130000] Incremented iSCSI Connection count to 1 from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124506.130000] Established iSCSI session from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124506.130000] Incremented number of active iSCSI sessions to 1 on iSCSI 
> Target Portal Group: 1
>    [124511.130000] Decremented iSCSI connection count to 0 from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124511.130000] TARGET_CORE[iSCSI]: Deregistered fabric_sess
>    [124511.130000] Released iSCSI session from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124511.130000] Decremented number of active iSCSI Sessions on iSCSI TPG: 
> 1 to 0
>    [124513.130000] Received iSCSI login request from 169.254.200.5 on TCP 
> Network Portal 169.254.200.100:3260
>    [124513.130000] Located Storage Object: 
> iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
>    [124513.130000] Located Portal Group Object: 1
>    [124513.130000] TARGET_CORE[iSCSI]->TPG[1]_LUN[0] - Copying READ-WRITE 
> access for LUN
>    [124513.130000] TARGET_CORE[iSCSI]->TPG[1]_LUN[1] - Copying READ-WRITE 
> access for LUN
>    [124513.130000] iSCSI_TPG[1] - Added DYNAMIC ACL with TCQ Depth: 16 for 
> iSCSI Initiator Node: iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124513.130000] 
> ------------------------------------------------------------------
>    [124513.130000] AuthMethod:                   None
>    [124513.130000] HeaderDigest:                 None
>    [124513.130000] DataDigest:                   None
>    [124513.130000] MaxRecvDataSegmentLength:     65536
>    [124513.130000] 
> ------------------------------------------------------------------
>    [124513.130000] 
> ------------------------------------------------------------------
>    [124513.130000] TargetName:                   
> iqn.2004-04.com.qnap:ts-410:iscsi.target01.c4e22a
>    [124513.130000] InitiatorName:                
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124513.130000] TargetAlias:                  QNAP Target
>    [124513.130000] InitiatorAlias:               netbsd6.localnet
>    [124513.130000] TargetPortalGroupTag:         1
>    [124513.130000] InitialR2T:                   Yes
>    [124513.130000] ImmediateData:                Yes
>    [124513.130000] ErrorRecoveryLevel:           0
>    [124513.130000] SessionType:                  Normal
>    [124513.130000] 
> ------------------------------------------------------------------
>    [124513.130000] TARGET_CORE[iSCSI]: Registered fabric_sess_ptr: cc7f4e60
>    [124513.130000] iSCSI Login successful on CID: 1 from 169.254.200.5 to 
> 169.254.200.100:3260,1
>    [124513.130000] Incremented iSCSI Connection count to 1 from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124513.130000] Established iSCSI session from node: 
> iqn.1994-04.org.netbsd:iscsi.netbsd6.localnet:0
>    [124513.130000] Incremented number of active iSCSI sessions to 1 on iSCSI 
> Target Portal Group: 1




Home | Main Index | Thread Index | Old Index