Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read Capacity reports total # of blocks, not address of last block #8

Open
dsu-igeek opened this issue Apr 26, 2012 · 2 comments · Fixed by ActiveVolcano/jSCSI#1 · May be fixed by #43
Open

Read Capacity reports total # of blocks, not address of last block #8

dsu-igeek opened this issue Apr 26, 2012 · 2 comments · Fixed by ActiveVolcano/jSCSI#1 · May be fixed by #43

Comments

@dsu-igeek
Copy link
Contributor

I've been getting reads past the end of my device from the Linux iSCSI initiator and the size reported in the log when login to the device occurs is the number of blocks + 1. The ReadCapacityStage uses the AbstractStorageModule.getSizeInBlocks() as the
returned LBA and I think it should be using getSizeInBlocks() - 1, the address of the last addressable block.

This man page explains the behavior, http://manpages.ubuntu.com/manpages/dapper/man8/sg_readcap.8.html.

If you agree, I'll submit a fix for this. It may require some changes on the initiator side as well but I'm not using that at the moment so I haven't dug too deeply into it.

@sebastiangraf
Copy link
Owner

Makes sense, yes.

Could you provide a fix…I am going to let it tested against the initiator and will merge in if the test stays successful.

@felipegutierrez
Copy link

Hi, I think my problem is related to ReadCapacity16. I could open 8TB in Widows but when I try to open 16 TB if fails and the wireShark shows [Malformed Packet: SCSI]. Could you help me to solve this? I am using MS iscsi initiator.on win8.
The MS iscsi initiator sends this message: SCSI CDB Service Action In(16)

The iscsi target respnse is:
SCSI Payload (Service Action In(16) Response Data)
LBA: 34359738368 (16384 GB)
Block size in bytes: 512
[Malformed Packet: SCSI]

This is the log of wireShark http://ustore1.rnp.br/ustore/faces/publicFile.xhtml?code=18d9c3271e0606816fd2183e924ffd8b

thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment