[Stgt-devel] segfault in the ssc code ...
Richard Sharpe
realrichardsharpe
Sun Jul 27 22:47:22 CEST 2008
On Fri, Jul 25, 2008 at 11:01 PM, ronnie sahlberg
<ronniesahlberg at gmail.com> wrote:
> MMC also uses the media changer.
>
> Please verify that the example of "DVD jukebox" that is described in
> README.mmc still works
> after your changes to the mediachanger.
Hmmm, with the July 15 snapshot, and this set of commands:
# Create a DVD target ...
./usr/tgtadm --lld iscsi --op new --mode target --tid 2 -T iqn.2008-03.c
om.datalane-inc:storage.dvd1.tyan1U00.sys1
# Now the DVD drive
./usr/tgtadm --lld iscsi --op new --mode logicalunit --tid 2 --lun 1 -Y cd
./usr/tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun 1 --params
vendor_id=STGT_DVD,product_id=DVD101,product_rev=0010,scsi_sn=STGTDVD01,removab
le=1
./usr/tgtadm --lld iscsi --op new --mode logicalunit --tid 2 --lun 2 -b /mnt/
testing/virtual-tapes/smc --device-type=changer
./usr/tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun 2 --params
vendor_id=STK,product_id=L700,product_rev=0010,scsi_sn=STK0101,removable=1
# A data transfer unit ...
./usr/tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun 2 --params
element_type=4,start_address=1,quantity=1
./usr/tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun 2 --params
element_type=4,address=1,tid=1,lun=1
./usr/tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun 2 --params
element_type=1,start_address=16,quantity=1
./usr/tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun 2 --params
media_home=/mnt/testing/virtual-tapes
./usr/tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun 2 --params
element_type=2,start_address=1024,quantity=8
./usr/tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun 2 --params
element_type=2,address=1024,barcode=DVD00,sides=1
./usr/tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun 2 --params
element_type=2,address=1025,barcode=DVD01,sides=1
./usr/tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun 2 --params
element_type=2,address=1026,barcode=DVD02,sides=1
./usr/tgtadm --lld iscsi --op update --mode logicalunit --tid 2 --lun 2 --params
element_type=2,address=1027,barcode=DVD03,sides=1
./usr/tgtadm --lld iscsi --op bind --mode target --tid 2 -I ALL
./usr/tgtadm --lld iscsi --mode target --op show
Which produces this output:
./usr/tgtadm --lld iscsi --op show --mode target
Target 2: iqn.2008-03.com.datalane-inc:storage.dvd1.tyan1U00.sys1
System information:
Driver: iscsi
State: ready
I_T nexus information:
I_T nexus: 1
Initiator: iqn.1994-05.com.redhat:2dc216ee3e97
Connection: 0
IP Address: 192.168.1.20
LUN information:
LUN: 0
Type: controller
SCSI ID: deadbeaf2:0
SCSI SN: beaf20
Size: 0 MB
Online: Yes
Removable media: No
Backing store: No backing store
LUN: 1
Type: cd/dvd
SCSI ID: deadbeaf2:1
SCSI SN: STGTDVD01
Size: 0 MB
Online: No
Removable media: Yes
Backing store: No backing store
LUN: 2
Type: changer
SCSI ID: deadbeaf2:2
SCSI SN: STK0101
Size: 0 MB
Online: Yes
Removable media: Yes
Backing store: /mnt/testing/virtual-tapes/smc
Account information:
ACL information:
ALL
I get this when trying to load a DVD into the transfer station:
mtx -f /dev/sg4 load 1 mtx: Request
Sense: Long Report=yes
mtx: Request Sense: Valid Residual=no
mtx: Request Sense: Error Code=70 (Current)
mtx: Request Sense: Sense Key=Hardware Error
mtx: Request Sense: FileMark=no
mtx: Request Sense: EOM=no
mtx: Request Sense: ILI=no
mtx: Request Sense: Additional Sense Code = 15
mtx: Request Sense: Additional Sense Qualifier = 01
mtx: Request Sense: BPV=no
mtx: Request Sense: Error in CDB=no
mtx: Request Sense: SKSV=no
MOVE MEDIUM from Element Address 1024 to 1 Failed
(I get a different error with my changes ... dvdrecord says:)
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
cdrecord: Found DVD+ media but DVD+R/DVD+RW support code is missing.
cdrecord: If you need DVD+R/DVD+RW support, ask the Author for cdrecord-ProDVD.
cdrecord: Free test versions and free keys for personal use are at
ftp://ftp.berlios.de/pub/cdrecord/ProDVD/
cdrecord: Sorry, no CD/DVD-Recorder or unsupported CD/DVD-Recorder
found on this target.
Using generic SCSI-3/mmc CD-ROM driver (mmc_cd).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
cdrecord: Track 1 has unknown length.
cdrecord: Use tsize= option in SAO mode to specify track size.
More information about the stgt
mailing list