How to convert 'devname' to 'scsibus, target, lun' in RHEL3 (2.4 kernel)?

View: New views
4 Messages — Rating Filter:   Alert me  

How to convert 'devname' to 'scsibus, target, lun' in RHEL3 (2.4 kernel)?

by Bo Xie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I know cdrecord only officially support 'scsibus,target,lun'.

My program only has 'devname', and I want to add a burn CD function
using cdrecord. Then I need to find a way to convert 'devname' to
'scsibus,target,lun' by myself.

I know I am not the first one to ask this question, any comment or
existing solution?

Thanks!
_______________________________________________
Cdrecord-support mailing list
Cdrecord-support@...
https://lists.berlios.de/mailman/listinfo/cdrecord-support

Re: How to convert 'devname' to 'scsibus, target, lun' in RHEL3 (2.4 kernel)?

by Phil Rhodes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> My program only has 'devname', and I want to add a burn CD function
> using cdrecord. Then I need to find a way to convert 'devname' to
> 'scsibus,target,lun' by myself.

I just had to use -scanbus and present a list of CD burners by
manufacturer's name and device ID. It's really not ideal, but as far as I
can tell, the "scsi bus" numbers don't really refer to anything useful, it's
just an internal addressing scheme for cdrecord.

Likewise, if anyone can tell me how to derive a Windows drive letter from
cdrecord's cryptic triplets, I'd be pleased to hear about it.

Phil


_______________________________________________
Cdrecord-support mailing list
Cdrecord-support@...
https://lists.berlios.de/mailman/listinfo/cdrecord-support

Re: How to convert 'devname' to 'scsibus, target, lun' in RHEL3 (2.4 kernel)?

by Joerg Schilling-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bo Xie <xiebopublic@...> wrote:

> I know cdrecord only officially support 'scsibus,target,lun'.
>
> My program only has 'devname', and I want to add a burn CD function
> using cdrecord. Then I need to find a way to convert 'devname' to
> 'scsibus,target,lun' by myself.

'scsibus,target,lun' is the "devname", guess that you are talking about a
"traditional UNI /dev/ driver entry".

        Run cdrecord -scanbus.

If you only have one drive in your system, omit the dev= parameter.

The problem on Linux is that that there is no clean orthogonal SCSI subsystem
in the Linux kernel that supports all SCSI devices in a single driver
framework. Some drives (including CD/DVD-weiters) even may have more than
driver for a single piece of hardware.

Even on a cleanly written OS, there may be SCSI devices that have no own driver
and thus may only accessed by talking through the SCSI generic layer.
Other OS do not implement "visible" "native device drivers" at all and thus do
not allow you to find such a name at all.

As you see, there is no 1:1 relation between the portable OS independent SCSI
device specifyer and what you may be looking for.

I recommend you to change your program.....

Jörg

--
 EMail:joerg@... (home) Jörg Schilling D-13353 Berlin
       js@...                (uni)  
       joerg.schilling@... (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
Cdrecord-support mailing list
Cdrecord-support@...
https://lists.berlios.de/mailman/listinfo/cdrecord-support

Re: How to convert 'devname' to 'scsibus, target, lun' in RHEL3 (2.4 kernel)?

by Phil Rhodes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The only way around this I've found is to fritz the firmware on the drives,
so instead of getting:

Optiarc DVD-AD5170A
Optiarc DVD-AD5170A
Optiarc DVD-AD5170A
Optiarc DVD-AD5170A

I get:

Optiarc DVD5170A(1)
Optiarc DVD5170A(2)
Optiarc DVD5170A(3)
Optiarc DVD5170A(4)

Then at least you can tell which drive you're looking at. Horrible thing to
have to do, though.

P


_______________________________________________
Cdrecord-support mailing list
Cdrecord-support@...
https://lists.berlios.de/mailman/listinfo/cdrecord-support