Linux sg3_utils sg_map lists stale/dead device nodes

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

 



Hello,

Greetings...!

I am the Linux driver engineer for the PMC-Sierra driver team working on
aacraid drivers.

The Linux aacraid driver is connected with the SCSI upper layer driver
modules (sd, sg, ....). 

We are using Linux sg3_utils tool package `sg_map` command to list
mapping between sg and SCSI devices. When the enclosure cable is plugged
out, the scsi device entries /dev/sd* being disappeared as expected.
But, it still sees stale/dead sg device nodes. Did anybody seen this
issue with some other vendor drivers ? I hope you can shed some light on
the situation.

Please see the details of this issue below:

1. Expander is connected to the Adaptec RAID HBA controller and the
connected disk devices recognized by driver/OS. Executed sg_map command
and it displays device mappings as expected.

# sg_map
/dev/sg0  /dev/sr0
/dev/sg1  /dev/sda
/dev/sg2  /dev/sdb
/dev/sg3  /dev/sdc
/dev/sg4  /dev/sdd
/dev/sg5  /dev/sde
/dev/sg6  /dev/sdf
/dev/sg7  /dev/sdg
/dev/sg8

2. Plugged out SAS enclosure device cable

When the enclosure SAS cable is plugged out, driver marks the SCSI
device offline by setting SDV_OFFLINE to a OS SCSI upper layer
"scsi_device_set_state" function. Executed sg_map command. I could see
that SCSI device entries /dev/sd[b-g] being disappeared on executing
"sg_map" command. But, sg_map still sees stale/dead device nodes
/dev/sg[2-7]. 

# sg_map
/dev/sg0  /dev/sr0
/dev/sg1  /dev/sda
/dev/sg2
/dev/sg3
/dev/sg4
/dev/sg5
/dev/sg6
/dev/sg7
/dev/sg8

I am not sure if it's an expected behavior with this way of notifying OS
SCSI upper layers (setting SDV_OFFLINE to "scsi_device_set_state"
function).

Is there a recommend way to notify OS SCSI upper layers ?? 

Please help.

Sincerely,
Mahesh
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux