Re: ROM target type

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

 



So I've found a solution! Thanks to "cc_Smart" <smart@xxxxxxxxxxx> for
pointing back to tgt iSCSI target.

The closest I had come before this was using iSCSI with the pSCSI
backend in the kernel, but that seems to produce a memory leak that
consumes all RAM ... some sort of infinite loop on initiator login?

Going back to userspace tools did the trick for me, but I had to dig
to find the right flags to give it.

1. First, find what /dev/sg device maps to the DVD drive
# for dev in /dev/sg*; do sdparm "$dev" | grep '\[cd/dvd\]$'; done
In my case, /dev/sg0 is the generic device for /dev/sr0

2. Create the iSCSI target as normal (including ACL/whitelist)

3. Create the iSCSI logical unit
# tgtadm --mode logicalunit --op new --tid 1 --lun 1 --backing-store
/dev/sg0 --device-type pt --bstype sg
# tgtadm --mode logicalunit --op update --tid 1 --lun 1 --params removable=1

4. Log in on the initiator as normal

I thought at first I was hitting another bug in tgtd, but it's just
that the BluRay disc I was testing with only works in one of my two
drives (despite the drives being identical models). ¯\_(ツ)_/¯

My /etc/tgt/conf.d file for 5 DVD drives (I should probably write some
udev rules for by-id symlinks to sg devices):
default-driver iscsi

<target iqn.2007-03:dvdroms:frankie>
bs-type sg
device-type pt
removable 1
readonly 1
initiator-address 192.168.9.9
block-size 512

backing-store /dev/sg0
backing-store /dev/sg1
backing-store /dev/sg2
backing-store /dev/sg4
backing-store /dev/sg5
</target>

Have fun with this info. Or not :)

Thanks all,
Ben Klein
On Wed, 24 Oct 2018 at 10:03, Ed L. Cashin
<ecashin@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> I would also assume that remotely ejecting would not work.
>
> Sorry to be of little help.
>
> On Tue, Oct 23, 2018 at 6:29 AM Ben Klein <shacklein@xxxxxxxxx> wrote:
> >
> > I tried that. It still treats the device as a file. So first, the disc
> > needs to be loaded before starting vblade, and libdvdcss/libaacs can't
> > decode encrypted discs. I would assume that remotely ejecting would
> > also not work with vblade as the target.
>
>
>
> --
>   Ed Cashin <ecashin@xxxxxxxxxxxx>
>   http://noserose.net/e/
>   http://www.coraid.com/


_______________________________________________
Aoetools-discuss mailing list
Aoetools-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/aoetools-discuss




[Index of Archives]     [Linux ARM Kernel]     [Linux SCSI]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux