[stgt] Invalid request for --bstype aio and sg

faizan husain faizanh at linux.vnet.ibm.com
Wed Jul 11 08:18:22 CEST 2012


Hi,

Reposting the problem again with complete detail and step to reproduce.


  setup a targets.conf file with bs-type aio

like :

<target mgmt002st001>
    driver iser
    write-cache off
    bs-type aio
    backing-store "/dev/disk/by-path/pci-0000:16:00.0-scsi-0:2:1:0"
    backing-store "/dev/disk/by-path/pci-0000:16:00.0-scsi-0:2:2:0"
    backing-store "/dev/disk/by-path/pci-0000:16:00.0-scsi-0:2:3:0"
    backing-store "/dev/disk/by-path/pci-0000:16:00.0-scsi-0:2:4:0"
    backing-store "/dev/disk/by-path/pci-0000:16:00.0-scsi-0:2:5:0"
</target>

and try to start the service :

[root at sonas03.mgmt002st001  <mailto:root at sonas03.mgmt002st001>  ~]# service tgtd restart
Stopping SCSI target daemon: not running                   [FAILED]
Starting SCSI target daemon:                               [  OK  ]
tgtadm: invalid request
Command:
         tgtadm -C 0 --lld iser --op new --mode logicalunit --tid 1 --lun 1 -b /dev/disk/by-path/pci-0000:16:00.0-scsi-0:2:1:0  --bstype aio
exited with code: 22.

and it seems that the underlying tgtadm component simply can't handle it anymore :

[root at sonas03.mgmt002st001  <mailto:root at sonas03.mgmt002st001>  ~]# tgtadm -C 0 --lld iser --op new --mode logicalunit --tid 1 --lun 1 -b /dev/disk/by-path/pci-0000:16:00.0-scsi-0:2:1:0  --bstype aio
tgtadm: invalid request

running the same command with bstype rdwr succeeds :

tgtadm -C 0 --lld iser --op new --mode logicalunit --tid 1 --lun 2 -b /dev/disk/by-path/pci-0000:16:00.0-scsi-0:2:1:0  --bstype rdwr

also the sg type seems to be broken :


tgtadm -C 0 --lld iser --op new --mode logicalunit --tid 1 --lun 1 -b /dev/disk/by-path/pci-0000:16:00.0-scsi-0:2:1:0  --bstype sg
tgtadm: invalid request

the only one that seems to work is rdwr , which is very inefficient .

so i downloaded the latest available source version :  1.0.29

and compiled with :

make ISCSI=1 ISCSI_RDMA=1

on the system where the problem occurs and the problem is gone .
so there seems to a fix for this bug between 1.0.24 (which is what RHEL 6.3 ships) and 1.0.29
or there is a problem with the BUILD system used e.g. lib-aio not installed during compile time.

Anyone have any idea about the issue?

Thanks
Faizan



--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list