Hide Forgot
snitzer sez: OK, ideally the target will provide support for both of these: 1) READ CAPACITY(16) provides the block sizes and alignment offset: LOGICAL BLOCK LENGTH IN BYTES: /sys/block/<disk>/queue/physical_block_size LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT is used to derive: /sys/block/<disk>/queue/logical_block_size LOWEST ALIGNED LOGICAL BLOCK ADDRESS: /sys/block/<disk>/alignment_offset /sys/block/<disk>/<partition>/alignment_offset 2) BLOCK LIMITS VPD provides the "I/O hints": OPTIMAL TRANSFER LENGTH GRANULARITY and OPTIMAL TRANSFER LENGTH are used to derive: /sys/block/<disk>/queue/minimum_io_size /sys/block/<disk>/queue/optimal_io_size The sg3_utils package provides the 'sg_inq' utility that can be used to access the BLOCK LIMITS VPD page (0xb0), using: sg_inq -p 0xb0 <device>
fix implemented and accepted upstream.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
The following information are presented correctly on the exported LUN LOGICAL BLOCK LENGTH IN BYTES LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT LOWEST ALIGNED LOGICAL BLOCK ADDRESS OPTIMAL TRANSFER LENGTH GRANULARITY OPTIMAL TRANSFER LENGTH ---- rpm -q scsi-target-utils scsi-target-utils-1.0.24-1.el6.x86_64 rpm -q iscsi-initiator-utils iscsi-initiator-utils-6.2.0.872-36.el6.x86_64 Configure LUN on the Target modprobe scsi_debug sector_size=4096 dev_size_mb=10 lowest_aligned=512 physblk_exp=1 num_parts=1 edit /etc/tgt/targets.conf default-driver iscsi <target iqn.2009-10.com.redhat:storage-1> write-cache off allow-in-use yes <direct-store /dev/sda> </direct-store> </target> service tgtd restart Stopping SCSI target daemon: not running [FAILED] Starting SCSI target daemon: [ OK ] Discover LUN on the Initiator iscsiadm -m discovery -t st -p "127.0.0.1" -I default -P1 Starting iscsid: [ OK ] Target: iqn.2009-10.com.redhat:storage-1 Portal: 127.0.0.1:3260,1 Iface Name: default iscsiadm -m node -l sg_inq -p 0xb0 /dev/sda VPD INQUIRY: Block limits page (SBC) Optimal transfer length granularity: 2 blocks Maximum transfer length: 2560 blocks Optimal transfer length: 64 blocks Maximum prefetch, xdread, xdwrite transfer length: 0 blocks Maximum unmap LBA count: 0 Maximum unmap block descriptor count: 0 Optimal unmap granularity: 1 Unmap granularity alignment valid: 0 Unmap granularity alignment: 0 sg_inq -p 0xb0 /dev/sdb VPD INQUIRY: Block limits page (SBC) Optimal transfer length granularity: 2 blocks Maximum transfer length: 0 blocks Optimal transfer length: 64 blocks Maximum prefetch, xdread, xdwrite transfer length: 0 blocks Maximum unmap LBA count: 0 Maximum unmap block descriptor count: 0 Optimal unmap granularity: 0 Unmap granularity alignment valid: 0 Unmap granularity alignment: 0 cat /sys/block/sda/queue/physical_block_size 8192 sg_readcap -l /dev/sda Read Capacity results: Protection: prot_en=0, p_type=0, p_i_exponent=0 Thin provisioning: tpe=0, tprz=0 Last logical block address=2559 (0x9ff), Number of logical blocks=2560 Logical block length=4096 bytes Logical blocks per physical block exponent=1 Lowest aligned logical block address=512 Hence: Device size: 10485760 bytes, 10.0 MiB, 0.01 GB cat /sys/block/sda/sda1/alignment_offset 0 cat /sys/block/sdb/queue/physical_block_size 8192 sg_readcap -l /dev/sdb Read Capacity results: Protection: prot_en=0, p_type=0, p_i_exponent=0 Thin provisioning: tpe=0, tprz=0 Last logical block address=2559 (0x9ff), Number of logical blocks=2560 Logical block length=4096 bytes Logical blocks per physical block exponent=1 Lowest aligned logical block address=512 Hence: Device size: 10485760 bytes, 10.0 MiB, 0.01 GB cat /sys/block/sdb/sdb1/alignment_offset 0
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2012-0970.html