export real dvd drive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello 


Can I export real DVD drive/device using tgt? 

Did something change since:
http://lists.wpkg.org/pipermail/stgt/2008-September/002117.html ?


I tried to use passthrough device type:

#v+
$ lsscsi -g | grep sr0
[3:0:0:0]    cd/dvd  PBDS     DVD+-RW DS-8W1P  BD1B  /dev/sr0 /dev/sg2

$ tgtd -d 9
$ tgtadm --lld iscsi --mode target --op new --tid 1 -T iqn.2001-04.mobile:dvd
$ tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 --bstype=sg --device-type=pt -b /dev/sg2
$ tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
v-

But it does not work. `tgt-admin --show` presents pretty exported
targets but logs shows:

#v+  # 
Jul 19 16:05:37 mobile tgtd: semkey 0x6101f834 already exists
Jul 19 16:05:37 mobile tgtd: semkey 0x6101f834
Jul 19 16:05:37 mobile tgtd: tgtd daemon started, pid:8201 
Jul 19 16:05:37 mobile tgtd: tgtd logger started, pid:8202 debug:9 
Jul 19 16:05:38 mobile tgtd: work_timer_start(146) use timer_fd based scheduler 
Jul 19 16:05:38 mobile tgtd: work_timer_start(181) started, timeout: 500 msec 
Jul 19 16:05:38 mobile tgtd: bs_init(312) use signalfd notification 
Jul 19 16:05:59 mobile tgtd: tgt_mgmt(393) 149 0 1 0 1 0 ffffffffffffffff targetname=iqn.2001-04.mobile:dvd 8201 
Jul 19 16:05:59 mobile tgtd: tgt_device_create(474) 1 0 
Jul 19 16:05:59 mobile tgtd: tgt_device_create(648) Add a logical unit 0 to the target 1 
Jul 19 16:05:59 mobile tgtd: tgt_target_create(1919) Succeed to create a new target 1 
Jul 19 16:06:03 mobile tgtd: tgt_mgmt(393) 139 0 2 0 1 0 1 path=/dev/sg2,bstype=sg 8201 
Jul 19 16:06:03 mobile tgtd: tgt_device_create(474) 1 1 
Jul 19 16:06:03 mobile tgtd: tgt_device_create(648) Add a logical unit 1 to the target 1 
Jul 19 16:06:05 mobile tgtd: tgt_mgmt(393) 137 0 1 3 1 0 ffffffffffffffff initiator-address=ALL 8201 
Jul 19 16:06:37 mobile tgtd: accept_connection(99) 4 
Jul 19 16:06:37 mobile tgtd: cmnd_exec_login(716) Login request (operational negotiation): 0 
Jul 19 16:06:37 mobile tgtd: login_start(554) exp_cmd_sn: 0,0 
Jul 19 16:06:37 mobile tgtd: it_nexus_create(273) 1 1 0 
Jul 19 16:06:37 mobile tgtd: session_create(135) session_create: 0x10000013d0200 
Jul 19 16:06:37 mobile tgtd: conn_take_fd(213) 0 1 0 10000013d0200 
Jul 19 16:06:37 mobile tgtd: iscsi_scsi_cmd_rx_start(1607) 1 12 0 0 36 1 1 
Jul 19 16:06:37 mobile tgtd: iscsi_task_queue(1552) 0 0 1 
Jul 19 16:06:37 mobile tgtd: target_cmd_queue(935) 0x83e3680 12 0 
Jul 19 16:06:37 mobile tgtd: target_cmd_perform(966) 0x83e3680 12 0 1 
Jul 19 16:06:37 mobile tgtd: spc_inquiry(163) 0 0 
Jul 19 16:06:37 mobile tgtd: target_cmd_perform(977) 1 12 (nil) 0x83e4000 0 0 36 0 0 
Jul 19 16:06:37 mobile tgtd: iscsi_scsi_cmd_done(1225) shrunk too big device read len 66 > 36 
Jul 19 16:06:37 mobile tgtd: iscsi_task_tx_start(1898) found a task 1 36 0 0 
Jul 19 16:06:37 mobile tgtd: iscsi_data_rsp_build(1090) 36 36 36 81921 
Jul 19 16:06:37 mobile tgtd: __cmd_done(1066) (nil) 0x83e4000 0 36 0 
Jul 19 16:06:37 mobile tgtd: iscsi_task_tx_start(1923) no more data 
Jul 19 16:06:37 mobile tgtd: iscsi_scsi_cmd_rx_start(1607) 1 12 0 0 68 1 2 
Jul 19 16:06:37 mobile tgtd: iscsi_task_queue(1552) 1 1 1 
Jul 19 16:06:37 mobile tgtd: target_cmd_queue(935) 0x83e3680 12 0 
Jul 19 16:06:37 mobile tgtd: target_cmd_perform(966) 0x83e3680 12 0 1 
Jul 19 16:06:37 mobile tgtd: spc_inquiry(163) 0 0 
Jul 19 16:06:37 mobile tgtd: target_cmd_perform(977) 2 12 (nil) 0x83e4000 0 0 66 0 0 
Jul 19 16:06:37 mobile tgtd: iscsi_task_tx_start(1898) found a task 2 66 0 0 
Jul 19 16:06:37 mobile tgtd: iscsi_data_rsp_build(1090) 66 66 66 81922 
Jul 19 16:06:37 mobile tgtd: __cmd_done(1066) (nil) 0x83e4000 0 66 0 
Jul 19 16:06:37 mobile tgtd: iscsi_task_tx_start(1923) no more data 
Jul 19 16:06:37 mobile tgtd: iscsi_scsi_cmd_rx_start(1607) 1 a0 0 0 4096 1 3 
Jul 19 16:06:37 mobile tgtd: iscsi_task_queue(1552) 2 2 1 
Jul 19 16:06:37 mobile tgtd: target_cmd_queue(935) 0x83e3680 a0 0 
Jul 19 16:06:37 mobile tgtd: target_cmd_perform(966) 0x83e3680 a0 0 1 
Jul 19 16:06:37 mobile tgtd: target_cmd_perform(977) 3 a0 (nil) 0x83e4000 0 0 4096 0 0 
Jul 19 16:06:37 mobile tgtd: iscsi_task_tx_start(1898) found a task 3 4096 0 0 
Jul 19 16:06:37 mobile tgtd: iscsi_data_rsp_build(1090) 24 4096 24 81923 
Jul 19 16:06:37 mobile tgtd: __cmd_done(1066) (nil) 0x83e4000 0 4096 0 
Jul 19 16:06:37 mobile tgtd: iscsi_task_tx_start(1923) no more data 
(...) last few lines are repeated infinitely ...
$v- 

On client  side `iscsi_discovery  target_IP -l'  succesfully discovers
exported target  and creates /dev/sdc  (!?) device but nothing  can be
done with  it. `head  -1 /dev/sdc` or  `mount /dev/sdc  /mnt/dvd` make
D-state process fully utilizing CPU :/.


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


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux