General
Showing results for 
Search instead for 
Do you mean 

running scsi protocol (inquiry) over fc ?

Occasional Contributor

running scsi protocol (inquiry) over fc ?

I'm trying to run some scsi commands on our fc connection.

 

After opening /dev/fclp0, building the esctl_io structure for CMDinquiry, and using the SIOC_INQUIRY  ioctl() call, I get back that SCSI is not supported on this device.

 

Figuring that I did something wrong, I downloaded the SG3-UTILS port from software depot, and ran:


# ./sg_persist /dev/fclp0

>> No service action given; assume Persistent Reserve In command

>> with Read Keys service action

inquiry: pass through os error: Invalid argument

sg_persist: /dev/fclp0 doesn't respond to a SCSI INQUIRY

 

Which at least made me feel a tad bit better - in that my simple program was getting the same result.

 

This of course begs the question - on 11.3i - how does one "talk scsi" on the fc?  Pointers to documentation or other information greatly appreciated.

 

Thanks in advance,

 

jerry heyman

3 REPLIES
HPE Pro

Re: running scsi protocol (inquiry) over fc ?

The /dev/fc* DSF is for the HBA (i.e. fro HBA management), it doesn't lead to the disk devices.

 

If you want to communicate to a disk device you must run the command against DSF mapped to the disk.

I.e. /dev/rdisk/diskX  or maybe you'd need passthru device (depending on what exactly the command does),

which, if it doesn't exist, can be created by using something like this:

 

# ioscan -fknNC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      1  64000/0xfa00/0x0  esdisk   CLAIMED     DEVICE       HP      Virtual Disk
                      /dev/disk/disk1      /dev/disk/disk1_p3   /dev/rdisk/disk1_p2
..

# mksf -H 64000/0xfa00/0x0 -P -r
# ll /dev/pt/
total 0
crw-r-----   1 bin        sys         12 0x000000 Nov 21 00:49 pt_disk1
# lssf /dev/pt/pt_disk1
esdisk section 0 at address 64000/0xfa00/0x0 /dev/pt/pt_disk1

I work for HP
Occasional Contributor

Re: running scsi protocol (inquiry) over fc ?


Stan_M wrote:

The /dev/fc* DSF is for the HBA (i.e. fro HBA management), it doesn't lead to the disk devices.

 

If you want to communicate to a disk device you must run the command against DSF mapped to the disk.

I.e. /dev/rdisk/diskX  or maybe you'd need passthru device (depending on what exactly the command does),

which, if it doesn't exist, can be created by using something like this:

 

# ioscan -fknNC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      1  64000/0xfa00/0x0  esdisk   CLAIMED     DEVICE       HP      Virtual Disk
                      /dev/disk/disk1      /dev/disk/disk1_p3   /dev/rdisk/disk1_p2
..

# mksf -H 64000/0xfa00/0x0 -P -r
# ll /dev/pt/
total 0
crw-r-----   1 bin        sys         12 0x000000 Nov 21 00:49 pt_disk1
# lssf /dev/pt/pt_disk1
esdisk section 0 at address 64000/0xfa00/0x0 /dev/pt/pt_disk1


Passthru is exactly what I'm looking for (I think).

 

So, if I understand correctly, I need to look at each entry in /dev/pt to determine which are connected by fc?  Running the SCSI Inquiry command down each entry and parsing out the output - or doing the above shell commands in that same directory?

 

Painful if there are *lots* of entries.

 

jerry

HPE Pro

Re: running scsi protocol (inquiry) over fc ?

The commands create passthru file for one disk device.

You can automate that in a script.

 

Yes, you need to find disk devices that you want to run command against. 

/dev/fc* DSF is by no means a 'group file' that would point to all the disk DSF connected to that HBA. 

I work for HP