All of lore.kernel.org
 help / color / mirror / Atom feed
* How to map between /dev/sdX and dev/sgX devices?
@ 2004-08-19 18:35 Reilley, Peter
  2004-08-19 19:12 ` Arjan van de Ven
  0 siblings, 1 reply; 6+ messages in thread
From: Reilley, Peter @ 2004-08-19 18:35 UTC (permalink / raw)
  To: linux-scsi

What is the correct way to find the corresponding scsi generic
device given the scsi disk node name?   I have a situation
where I must issue SCSI pass thru commands to a specific
/dev/sdX node.   I must find the correct /dev/sgX node is a 
situation where the system may go through a scsi reconfiguration
that would alter the mapping.   This is in a system where there 
could be a hundred scsi devices.

In my case this is related to iscsi but the problem is not
limited to iscsi.   Is there any good way of getting this
mapping.

Thanks,
Pete.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to map between /dev/sdX and dev/sgX devices?
  2004-08-19 18:35 Reilley, Peter
@ 2004-08-19 19:12 ` Arjan van de Ven
  2004-08-19 22:07   ` Douglas Gilbert
  0 siblings, 1 reply; 6+ messages in thread
From: Arjan van de Ven @ 2004-08-19 19:12 UTC (permalink / raw)
  To: Reilley, Peter; +Cc: linux-scsi

[-- Attachment #1: Type: text/plain, Size: 307 bytes --]

On Thu, 2004-08-19 at 20:35, Reilley, Peter wrote:
> What is the correct way to find the corresponding scsi generic
> device given the scsi disk node name?   I have a situation
> where I must issue SCSI pass thru commands to a specific
> /dev/sdX node.  

don't..... use SG_IO on the device directly

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: How to map between /dev/sdX and dev/sgX devices?
@ 2004-08-19 19:18 Reilley, Peter
  2004-08-19 20:58 ` Brian King
  0 siblings, 1 reply; 6+ messages in thread
From: Reilley, Peter @ 2004-08-19 19:18 UTC (permalink / raw)
  To: linux-scsi


> -----Original Message-----
> From: Arjan van de Ven [mailto:arjanv@redhat.com]
> Sent: Thursday, August 19, 2004 3:13 PM
> To: Reilley, Peter
> Cc: linux-scsi@vger.kernel.org
> Subject: Re: How to map between /dev/sdX and dev/sgX devices?
> 
> 
> On Thu, 2004-08-19 at 20:35, Reilley, Peter wrote:
> > What is the correct way to find the corresponding scsi generic
> > device given the scsi disk node name?   I have a situation
> > where I must issue SCSI pass thru commands to a specific
> > /dev/sdX node.  
> 
> don't..... use SG_IO on the device directly
> 

I don't think that this will work for me.
I must support the 2.4 kernel as well as the 2.6 kernel.

Thanks,
Pete.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to map between /dev/sdX and dev/sgX devices?
  2004-08-19 19:18 How to map between /dev/sdX and dev/sgX devices? Reilley, Peter
@ 2004-08-19 20:58 ` Brian King
  0 siblings, 0 replies; 6+ messages in thread
From: Brian King @ 2004-08-19 20:58 UTC (permalink / raw)
  To: Reilley, Peter; +Cc: linux-scsi

Reilley, Peter wrote:
>>-----Original Message-----
>>From: Arjan van de Ven [mailto:arjanv@redhat.com]
>>Sent: Thursday, August 19, 2004 3:13 PM
>>To: Reilley, Peter
>>Cc: linux-scsi@vger.kernel.org
>>Subject: Re: How to map between /dev/sdX and dev/sgX devices?
>>
>>
>>On Thu, 2004-08-19 at 20:35, Reilley, Peter wrote:
>>
>>>What is the correct way to find the corresponding scsi generic
>>>device given the scsi disk node name?   I have a situation
>>>where I must issue SCSI pass thru commands to a specific
>>>/dev/sdX node.  
>>
>>don't..... use SG_IO on the device directly
>>
> 
> 
> I don't think that this will work for me.
> I must support the 2.4 kernel as well as the 2.6 kernel.

Does sg_map work for you?

-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to map between /dev/sdX and dev/sgX devices?
  2004-08-19 19:12 ` Arjan van de Ven
@ 2004-08-19 22:07   ` Douglas Gilbert
  2004-08-20  0:04     ` Bryan Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Douglas Gilbert @ 2004-08-19 22:07 UTC (permalink / raw)
  To: arjanv; +Cc: Reilley, Peter, linux-scsi

Arjan van de Ven wrote:
> On Thu, 2004-08-19 at 20:35, Reilley, Peter wrote:
> 
>>What is the correct way to find the corresponding scsi generic
>>device given the scsi disk node name?   I have a situation
>>where I must issue SCSI pass thru commands to a specific
>>/dev/sdX node.  
> 
> 
> don't..... use SG_IO on the device directly

and if that breaks your app then try the equivalent
sg device to check that you haven't tripped over another
QOI issue.

Doug Gilbert

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to map between /dev/sdX and dev/sgX devices?
  2004-08-19 22:07   ` Douglas Gilbert
@ 2004-08-20  0:04     ` Bryan Henderson
  0 siblings, 0 replies; 6+ messages in thread
From: Bryan Henderson @ 2004-08-20  0:04 UTC (permalink / raw)
  To: dougg; +Cc: linux-scsi

>> don't..... use SG_IO on the device directly
>
>and if that breaks your app then try the equivalent
>sg device to check that you haven't tripped over another
>QOI issue.

What is QOI?

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-08-20  0:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-19 19:18 How to map between /dev/sdX and dev/sgX devices? Reilley, Peter
2004-08-19 20:58 ` Brian King
  -- strict thread matches above, loose matches on Subject: below --
2004-08-19 18:35 Reilley, Peter
2004-08-19 19:12 ` Arjan van de Ven
2004-08-19 22:07   ` Douglas Gilbert
2004-08-20  0:04     ` Bryan Henderson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.