Re: Newbie problems

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

 



Hi Lance,

On Mon, 2014-11-24 at 12:40 +0000, Lance Gropper wrote:
> Hello LIO friends:
> 
> A co-worker and myself are both trying LIO for the first time on a pair 
> of systems running Ubuntu Server LTS 14.04.1. We are using QLogic Fibre 
> targets (with iblock devices) and are having different problems, both of 
> which only occur when a Windows-based initiator connects:
> 
> On my co-workers' system, he is seeing repeating messages indicating:
> 
> SCSI OP 28h with too big sectors 16384 exceeds fabric_max_sectors: 8192
> 

So the MSFT initiator (Windows version..?) is sending individual I/Os
with a payload size of 16384 sectors * 512 bytes per sector = 8MB, and
hitting the hard-coded fabric_max_sectors limit of 4 MB in target-core.

There are two options for a work-around:

First option is to limit the max I/O size in the FC/SCSI miniport driver
on the MSFT initiator.

Depending on your version of Windows, this will involve a registry
change to reduce the current MaximumSGist or IIRC newer Windows versions
have a different way of doing this.  You'll need google around based on
your FC HBA driver to figure out how to do this.

The second option is to bump the hard-coded fabric_max_sectors limit
within target-core.  Here's a quick patch:

diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 23c518a..4445d97 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -78,7 +78,7 @@
 /* Default max_write_same_len, disabled by default */
 #define DA_MAX_WRITE_SAME_LEN                  0
 /* Default max transfer length */
-#define DA_FABRIC_MAX_SECTORS                  8192
+#define DA_FABRIC_MAX_SECTORS                  16384
 /* Use a model alias based on the configfs backend device name */
 #define DA_EMULATE_MODEL_ALIAS                 0
 /* Emulation for Direct Page Out */
@@ -111,7 +111,7 @@
 /* Force SPC-3 PR Activate Persistence across Target Power Loss */
 #define DA_FORCE_PR_APTPL                      0
 #define DA_STATUS_MAX_SECTORS_MIN              16
-#define DA_STATUS_MAX_SECTORS_MAX              8192
+#define DA_STATUS_MAX_SECTORS_MAX              16384
 /* By default don't report non-rotating (solid state) medium */
 #define DA_IS_NONROT                           0
 /* Queue Algorithm Modifier default for restricted reordering in control mode page */

So we've been limiting I/Os to 4 MB using 512 byte sectors in recent
times from a v3.4 kernel change introduced by Roland (CC'ed) in:

commit 015487b89f27d91d95a056cdc3c85e6c729bff12
Author: Roland Dreier <roland@xxxxxxxxxxxxxxx>
Date:   Mon Feb 13 16:18:17 2012 -0800

    target: Untangle front-end and back-end meanings of max_sectors attribute

However, most IBLOCK backends can use the block layer to split a 8 MB
payload into multiple I/Os as necessary outside of target-core.
FILEIO is also be able to handle up to 8 MB I/Os as well.

All that said, this issue will need to be addressed in mainline if new
versions of Windows are generating FC I/Os with 8 MB payloads using 512
byte sectors.

> On mine, I get different messages: When I add the target port, I get:
> 
> **** Failed mbx[0]=4005, mb[1]=4, mb[2]=8800, mb[3]=ffff, cmd=70 ****.
> Failed to enable receiving of RSCN request: 0x2.
> 

IIRC this RSCN failure is normal in Point-to-Point (eg: no FC switch)
configurations.

> Then when I try to connect with the Windows Initiator, I get:
> 
> TARGET_CORE[qla2xxx]: Expected Transfer Length: 512 does not match SCSI 
> CDB Length: 8 for SAM Opcode: 0x25
> 

Warning about fabric level EDTL vs. CDB length mismatch for the incoming
READ_CAPACITY command.  Can be safely ignored.

Thanks for reporting,

--nab

--
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