linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linux sg3_utils sg_map lists stale/dead device nodes
@ 2013-04-22  5:47 Mahesh Rajashekhara
  2013-04-22 14:22 ` Douglas Gilbert
  0 siblings, 1 reply; 2+ messages in thread
From: Mahesh Rajashekhara @ 2013-04-22  5:47 UTC (permalink / raw)
  To: linux-scsi; +Cc: Achim Leubner, Tony Ruiz, Mahesh Rajashekhara

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

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

end of thread, other threads:[~2013-04-22 14:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-22  5:47 Linux sg3_utils sg_map lists stale/dead device nodes Mahesh Rajashekhara
2013-04-22 14:22 ` Douglas Gilbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).