tgtadm:invalid request why?

classic Classic list List threaded Threaded
8 messages Options
ken
Reply | Threaded
Open this post in threaded view
|

tgtadm:invalid request why?

ken
Target 1: iqn.2013-02.com.storage.storagesrv:vtl
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB
            Online: Yes
            Removable media: No
            Backing store type: rdwr
            Backing store path: None
        LUN: 1
            Type: changer
            SCSI ID: IET     00010001
            SCSI SN: beaf11
            Size: 0 MB
            Online: Yes
            Removable media: Yes
            Backing store type: sg
            Backing store path: /dev/sg14
    Account information:
    ACL information:

 tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 2 --bstype=sg -Y tape -b /dev/sg6
tgtadm: invalid request

[root@storagesrv iet]# tail /var/log/messages
Jan 25 13:37:59 storagesrv vtltape[1773]: ssc_read_block_limits(): Read block limits (7776) **
Jan 25 13:37:59 storagesrv vtltape[1773]: CDB (7777) (delay 405): 1a 00 00 00 0c 00
Jan 25 13:37:59 storagesrv vtltape[1773]: spc_mode_sense(): MODE SENSE (7777) **
Jan 25 13:37:59 storagesrv vtltape[1773]: CDB (7778) (delay 405): 01 00 00 00 00 00
Jan 25 13:37:59 storagesrv vtltape[1773]: ssc_rewind(): Rewinding (7778) **
Jan 25 13:37:59 storagesrv vtltape[1773]: rewind_tape(): Media is writable
Jan 25 13:38:00 storagesrv tgtd: backed_file_open(111) Cannot use this mode 21b0
Jan 25 13:38:00 storagesrv tgtd: bs_ssc_open(625) Could not open /dev/st0 No medium found
Jan 25 14:11:46 storagesrv tgtd: backed_file_open(111) Cannot use this mode 21b0
Jan 25 14:11:46 storagesrv tgtd: bs_ssc_open(625) Could not open /dev/sg6 No medium found


[root@storagesrv iet]# lsscsi -g
[1:0:0:0]    cd/dvd  NECVMWar VMware IDE CDR10 1.00  /dev/sr0   /dev/sg0
[2:0:0:0]    disk    VMware   Virtual disk     1.0   /dev/sda   /dev/sg1
[2:0:1:0]    disk    VMware   Virtual disk     1.0   /dev/sdb   /dev/sg2
[2:0:2:0]    disk    VMware   Virtual disk     1.0   /dev/sdc   /dev/sg3
[2:0:3:0]    disk    VMware   Virtual disk     1.0   /dev/sdd   /dev/sg4
[2:0:4:0]    disk    VMware   Virtual disk     1.0   /dev/sde   /dev/sg5
[3:0:0:0]    mediumx STK      L700             0104  /dev/sch0  /dev/sg14
[3:0:1:0]    tape    IBM      ULT3580-TD5      0104  /dev/st0   /dev/sg6
[3:0:2:0]    tape    IBM      ULT3580-TD5      0104  /dev/st1   /dev/sg7
[3:0:3:0]    tape    IBM      ULT3580-TD4      0104  /dev/st2   /dev/sg8
[3:0:4:0]    tape    IBM      ULT3580-TD4      0104  /dev/st3   /dev/sg9
[3:0:8:0]    mediumx STK      L80              0104  /dev/sch1  /dev/sg15
[3:0:9:0]    tape    STK      T10000B          0104  /dev/st4   /dev/sg10
[3:0:10:0]   tape    STK      T10000B          0104  /dev/st5   /dev/sg11
[3:0:11:0]   tape    STK      T10000B          0104  /dev/st6   /dev/sg12
[3:0:12:0]   tape    STK      T10000B          0104  /dev/st7   /dev/sg13
Reply | Threaded
Open this post in threaded view
|

Re: tgtadm:invalid request why?

Mark Harvey
Administrator
For sg path, you need to use passthrough backing store. 

I'm assuming you want to use stgt as iSCSI target for mhVTL devices, rather than emulate tape devices in stgt..

Sent from my iPad

On Jan 25, 2013, at 17:27, "ken [via MHVTL - Linux Virtual Tape Library - Community Forums]" <[hidden email]> wrote:

Target 1: iqn.2013-02.com.storage.storagesrv:vtl
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB
            Online: Yes
            Removable media: No
            Backing store type: rdwr
            Backing store path: None
        LUN: 1
            Type: changer
            SCSI ID: IET     00010001
            SCSI SN: beaf11
            Size: 0 MB
            Online: Yes
            Removable media: Yes
            Backing store type: sg
            Backing store path: /dev/sg14
    Account information:
    ACL information:

 tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 2 --bstype=sg -Y tape -b /dev/sg6
tgtadm: invalid request

[root@storagesrv iet]# tail /var/log/messages
Jan 25 13:37:59 storagesrv vtltape[1773]: ssc_read_block_limits(): Read block limits (7776) **
Jan 25 13:37:59 storagesrv vtltape[1773]: CDB (7777) (delay 405): 1a 00 00 00 0c 00
Jan 25 13:37:59 storagesrv vtltape[1773]: spc_mode_sense(): MODE SENSE (7777) **
Jan 25 13:37:59 storagesrv vtltape[1773]: CDB (7778) (delay 405): 01 00 00 00 00 00
Jan 25 13:37:59 storagesrv vtltape[1773]: ssc_rewind(): Rewinding (7778) **
Jan 25 13:37:59 storagesrv vtltape[1773]: rewind_tape(): Media is writable
Jan 25 13:38:00 storagesrv tgtd: backed_file_open(111) Cannot use this mode 21b0
Jan 25 13:38:00 storagesrv tgtd: bs_ssc_open(625) Could not open /dev/st0 No medium found
Jan 25 14:11:46 storagesrv tgtd: backed_file_open(111) Cannot use this mode 21b0
Jan 25 14:11:46 storagesrv tgtd: bs_ssc_open(625) Could not open /dev/sg6 No medium found


[root@storagesrv iet]# lsscsi -g
[1:0:0:0]    cd/dvd  NECVMWar VMware IDE CDR10 1.00  /dev/sr0   /dev/sg0
[2:0:0:0]    disk    VMware   Virtual disk     1.0   /dev/sda   /dev/sg1
[2:0:1:0]    disk    VMware   Virtual disk     1.0   /dev/sdb   /dev/sg2
[2:0:2:0]    disk    VMware   Virtual disk     1.0   /dev/sdc   /dev/sg3
[2:0:3:0]    disk    VMware   Virtual disk     1.0   /dev/sdd   /dev/sg4
[2:0:4:0]    disk    VMware   Virtual disk     1.0   /dev/sde   /dev/sg5
[3:0:0:0]    mediumx STK      L700             0104  /dev/sch0  /dev/sg14
[3:0:1:0]    tape    IBM      ULT3580-TD5      0104  /dev/st0   /dev/sg6
[3:0:2:0]    tape    IBM      ULT3580-TD5      0104  /dev/st1   /dev/sg7
[3:0:3:0]    tape    IBM      ULT3580-TD4      0104  /dev/st2   /dev/sg8
[3:0:4:0]    tape    IBM      ULT3580-TD4      0104  /dev/st3   /dev/sg9
[3:0:8:0]    mediumx STK      L80              0104  /dev/sch1  /dev/sg15
[3:0:9:0]    tape    STK      T10000B          0104  /dev/st4   /dev/sg10
[3:0:10:0]   tape    STK      T10000B          0104  /dev/st5   /dev/sg11
[3:0:11:0]   tape    STK      T10000B          0104  /dev/st6   /dev/sg12
[3:0:12:0]   tape    STK      T10000B          0104  /dev/st7   /dev/sg13


If you reply to this email, your message will be added to the discussion below:
http://mhvtl-linux-virtual-tape-library-community-forums.966029.n3.nabble.com/tgtadm-invalid-request-why-tp4025242.html
To start a new topic under MHVTL - Linux Virtual Tape Library - Community Forums, email [hidden email]
To unsubscribe from MHVTL - Linux Virtual Tape Library - Community Forums, click here.
NAML
Regards from Australia
Mark Harvey
ken
Reply | Threaded
Open this post in threaded view
|

Re: tgtadm:invalid request why?

ken
Thanks. no pt option. maybe my stgt version too low.
nia
Reply | Threaded
Open this post in threaded view
|

Re: tgtadm:invalid request why?

nia
Administrator
Have you tried this ?

tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 2 --bstype=sg --device-type=pt -b /dev/sg6
ken
Reply | Threaded
Open this post in threaded view
|

Re: tgtadm:invalid request why?

ken
Yes, no pt option(redhat 6.0) .I will try new version.
nia
Reply | Threaded
Open this post in threaded view
|

Re: tgtadm:invalid request why?

nia
Administrator
fyi, you can download and compile the latest code directly from https://github.com/fujita/tgt
ken
Reply | Threaded
Open this post in threaded view
|

Re: tgtadm:invalid request why?

ken
Oh....no.  I update to scsi-target-utils-1.0.24-2.el6.i686
man tgtadm
    -Y, --device-type=<type>
           When creating a LUN, this parameter specifies the type of device to
           create. Default is disk.

           Possible device-types are:
               disk    : emulate a disk device
               tape    : emulate a tape reader
               ssc     : same as tape
               cd      : emulate a DVD drive
               changer : emulate a media changer device

       --lld [driver] --op new --mode target --tid=[id] --targetname [name]
           Add a new target with [id] and [name].

no pt option.
Reply | Threaded
Open this post in threaded view
|

Re: tgtadm:invalid request why?

Mark Harvey
Administrator
1.0.24 does support pt driver (unless RH removed it - unlikely)

try it.. It might just be missing from inline help

Sent from my iPad

On Jan 28, 2013, at 16:28, "ken [via MHVTL - Linux Virtual Tape Library - Community Forums]" <[hidden email]> wrote:

Oh....no.  I update to scsi-target-utils-1.0.24-2.el6.i686
man tgtadm
    -Y, --device-type=<type>
           When creating a LUN, this parameter specifies the type of device to
           create. Default is disk.

           Possible device-types are:
               disk    : emulate a disk device
               tape    : emulate a tape reader
               ssc     : same as tape
               cd      : emulate a DVD drive
               changer : emulate a media changer device

       --lld [driver] --op new --mode target --tid=[id] --targetname [name]
           Add a new target with [id] and [name].

no pt option.



To start a new topic under MHVTL - Linux Virtual Tape Library - Community Forums, email [hidden email]
To unsubscribe from MHVTL - Linux Virtual Tape Library - Community Forums, click here.
NAML
Regards from Australia
Mark Harvey