How to negotiate block size between target &initiator

987 views
Skip to first unread message

vaibhav nipunage

unread,
Feb 20, 2009, 5:50:24 AM2/20/09
to open-iscsi
Hi All,

I have question about how the iscsi-target & any initator negotiate
the block size. i.e. how initiator will understand that the iscsi-
target is configured for another size, say 4096. How will iscsi-target
tell the initiators that I am configured for 4096 as block size
instead of 512?

Please help me.

Thanks in advance.

Vaibhav Nipunage



Nicholas A. Bellinger

unread,
Feb 20, 2009, 6:51:00 AM2/20/09
to open-...@googlegroups.com
On Fri, 2009-02-20 at 02:50 -0800, vaibhav nipunage wrote:
> Hi All,
>
> I have question about how the iscsi-target & any initator negotiate
> the block size. i.e. how initiator will understand that the iscsi-
> target is configured for another size, say 4096. How will iscsi-target
> tell the initiators that I am configured for 4096 as block size
> instead of 512?
>

This is either done via READ_CAPACITY or READ_CAPACITY_16 CDBs during
SCSI device scan on the initiator/client side using the "Logical Block
Length in Bytes" or using Block Descriptor pages with MODE_SENSE* and
MODE_SELECT* to determine the "Logical Block Length" according to sbc-3
documents.

The latter is AFAICT is the preferred method to do detection of a
changed sector/block size in an OS independent manner. Linux for
example currently does this for TYPE_DISK using
drivers/scsi/sd.c:sd_revalidate_disk() to do this in a OS dependent
manner to redetermine what the total sector/block count and sector/block
size are for a given SCSI target endpoint.

--nab

StorageSolutionGroup

unread,
Feb 23, 2009, 6:12:43 PM2/23/09
to open-iscsi
Hi,

Windows does not support disks that have been formatted to anything
other than a 512byte block size. Block size refers to the low level
formatting of the disk and not the cluster or allocation size used by
NTFS. Be aware that using a disk with a block size larger than 512
bytes will cause applications not to function correctly. You should
check with your iSCSI target manufacture to ensure that their default
block size is set to 512 bytes or problems will likely occur.For
further reference and knowledge you can consult www.microsoft.com/document
www.Stonefly.com and www.DNFstorage.com.

Storage Solution Group.


Konrad Rzeszutek

unread,
Feb 24, 2009, 10:00:12 AM2/24/09
to open-...@googlegroups.com
On Mon, Feb 23, 2009 at 03:12:43PM -0800, StorageSolutionGroup wrote:
>
> Hi,
>
> Windows does not support disks that have been formatted to anything
> other than a 512byte block size. Block size refers to the low level
> formatting of the disk and not the cluster or allocation size used by
> NTFS. Be aware that using a disk with a block size larger than 512

What does Microsoft Windows have to do with the open-iscsi-initiator?

Or when you say "Windows" you mean Windows Storage Server?

Vladislav Bolkhovitin

unread,
Feb 24, 2009, 12:47:07 PM2/24/09
to open-...@googlegroups.com
Hi,
Not really correct, e.g.: http://support.microsoft.com/kb/923332/en-us.
For Vista+ non-512b blocks are officially supported by MS, for 2000+
they "just work" (I can't recall any problem).

> Storage Solution Group.
>
>
>
> >
>

Reply all
Reply to author
Forward
0 new messages