App need tape drive, But got pt, How to slove?

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

App need tape drive, But got pt, How to slove?

mzgcz
mhVTL + tgt send the driver sg* as type pt, But the app read the type of the drive (by ASPI), it only realise the tape.

How to solve it?
Reply | Threaded
Open this post in threaded view
|

Re: App need tape drive, But got pt, How to slove?

Mark Harvey
Administrator
Sorry, I do not understand what you are asking.

Can you supply an example of the problem ?
Can you supply details on how you configured tgtd ?

My test setup look like:

# cat /etc/tgt/targets.conf
# This is a sample config file for tgt-admin.
# By default, tgt-admin looks for its config file in /etc/tgt/targets.conf
<target iqn.2008-09.com.mhnbu75:mhvtl.target1>
 
       device-type pt
       bs-type sg
 
include /etc/tgt/mhvtl_targets.conf
 
       allow-in-use yes
</target>
===
# cat /etc/tgt/mhvtl_targets.conf
backing-store /dev/sg6
backing-store /dev/sg7
backing-store /dev/sg8
backing-store /dev/sg9
backing-store /dev/sg10
backing-store /dev/sg11
===

To match my 'mhVTL' devices of:
$ lsscsi -g 3
[3:0:0:0]    mediumx IBM      3573-TL          6.50  /dev/sch0  /dev/sg11
[3:0:1:0]    tape    IBM      ULT3580-TD5      0105  /dev/st0   /dev/sg6
[3:0:2:0]    tape    HP       Ultrium 5-SCSI   0105  /dev/st1   /dev/sg7
[3:0:3:0]    tape    IBM      ULT3580-TD4      0105  /dev/st3   /dev/sg9
[3:0:4:0]    tape    IBM      ULT3580-TD6      0105  /dev/st2   /dev/sg8
[3:0:5:0]    tape    STK      T10000B          0105  /dev/st4   /dev/sg10

And an iSCSI discovery returns:
# iscsiadm -m discovery -t sendtargets -p localhost
[::1]:3260,1 iqn.2008-09.com.mhnbu75:mhvtl.target1

To login:
# iscsiadm -m node -T iqn.2008-09.com.mhnbu75:mhvtl.target1 -p 127.0.0.1 --login

And the SCSI devices via the iSCSI connection:
# lsscsi -g 5
[5:0:0:0]    storage IET      Controller       0001  -         /dev/sg12
[5:0:0:1]    tape    STK      T10000B          0105  /dev/st5   /dev/sg13
[5:0:0:2]    mediumx IBM      3573-TL          6.50  /dev/sch1  /dev/sg14
[5:0:0:3]    tape    IBM      ULT3580-TD5      0105  /dev/st6   /dev/sg15
[5:0:0:4]    tape    HP       Ultrium 5-SCSI   0105  /dev/st7   /dev/sg16
[5:0:0:5]    tape    IBM      ULT3580-TD6      0105  /dev/st8   /dev/sg17
[5:0:0:6]    tape    IBM      ULT3580-TD4      0105  /dev/st9   /dev/sg18
Regards from Australia
Mark Harvey
Reply | Threaded
Open this post in threaded view
|

Re: App need tape drive, But got pt, How to slove?

mzgcz
In your example, device-type is pt in the /etc/tgt/targets.conf file.

So  when we use the cmd "tgtadm --lld iscsi --op show¬†¬†--mode target", we can see the device-type is passthrough, but the app need tape.
Reply | Threaded
Open this post in threaded view
|

Re: App need tape drive, But got pt, How to slove?

mzgcz
I slove it with scst,