* scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas
@ 2012-01-18 10:06 Sander Smeenk
2012-01-20 3:57 ` Nandigama, Nagalakshmi
2012-01-31 5:24 ` Nandigama, Nagalakshmi
0 siblings, 2 replies; 5+ messages in thread
From: Sander Smeenk @ 2012-01-18 10:06 UTC (permalink / raw)
To: linux-scsi
Hi,
i'm experiencing issues while hot(re)plugging SAS-drives in a server
running 2.6.32-37 (stock Ubuntu Lucid). The disks are connected to an
LSI Logic / Symbios Logic SAS1064 PCI-X Fusion-MPT SAS HBA (1000:0500 r2)
Google has no information at all on this specific errormessage.
Situation:
The server is running on 4xSAS drives with the mptsas module, disks are
JBODed to the OS, the OS has them in mdadm software raid.
Each disk needs to be replaced so i unconfigure one in mdadm, ask the
kernel to 'delete' the device node:
| # echo 1 > /sys/block/sdN/device/delete
And then i pull the disk after which the kernel logs:
| scsi: killing requests for dead queue
| scsi target4:0:1: mptsas: ioc0: delete device: fw_channel 0, fw_id 1,
| phy 1, sas_addr 0x500000e019670902
When i reseat the replacement disk, nothing gets logged. When i then ask
the kernel to rescan the scsi bus on host4, the kernel logs an error:
| # echo '- - -' > /sys/class/scsi_host/host4/scan
| scsi target4:0:4: target allocation failed, error -6
The replacement drive will not be available to the OS until the system
is rebooted after which the drive works like a charm.
The error message is produced in drivers/scsi/scsi_scan.c but i believe
the target_alloc() call comes from the drivers/scsi/mtpsas/mptsas.c
driver. Unfortunately my kernelhack-fu is lacking to look into this
further. As stated, Google has no information about this either.
Anyone on this list with clues as to why this happens or how to
circumvent it from happening with the other three disks?
Thanks,
With regards,
-Sander.
--
| How do you write zero in Roman numerals?
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas
2012-01-18 10:06 scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas Sander Smeenk
@ 2012-01-20 3:57 ` Nandigama, Nagalakshmi
2012-01-23 13:03 ` Sander Smeenk
2012-01-31 5:24 ` Nandigama, Nagalakshmi
1 sibling, 1 reply; 5+ messages in thread
From: Nandigama, Nagalakshmi @ 2012-01-20 3:57 UTC (permalink / raw)
To: Sander Smeenk, linux-scsi@vger.kernel.org
Request you to provide the response of "modinfo mptsas".
Also please capture the logs with the scsi logging set to 0x180000DB.
"echo 0x180000db > /proc/sys/dev/scsi/logging_level".
And mptsas debug level set to 0x3f8
"echo 3f8 > /sys/module/mptbase/parameters/mpt_debug_level"
Regards,
Nagalakshmi
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Sander Smeenk
Sent: Wednesday, January 18, 2012 3:37 PM
To: linux-scsi@vger.kernel.org
Subject: scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas
Hi,
i'm experiencing issues while hot(re)plugging SAS-drives in a server
running 2.6.32-37 (stock Ubuntu Lucid). The disks are connected to an
LSI Logic / Symbios Logic SAS1064 PCI-X Fusion-MPT SAS HBA (1000:0500 r2)
Google has no information at all on this specific errormessage.
Situation:
The server is running on 4xSAS drives with the mptsas module, disks are
JBODed to the OS, the OS has them in mdadm software raid.
Each disk needs to be replaced so i unconfigure one in mdadm, ask the
kernel to 'delete' the device node:
| # echo 1 > /sys/block/sdN/device/delete
And then i pull the disk after which the kernel logs:
| scsi: killing requests for dead queue
| scsi target4:0:1: mptsas: ioc0: delete device: fw_channel 0, fw_id 1,
| phy 1, sas_addr 0x500000e019670902
When i reseat the replacement disk, nothing gets logged. When i then ask
the kernel to rescan the scsi bus on host4, the kernel logs an error:
| # echo '- - -' > /sys/class/scsi_host/host4/scan
| scsi target4:0:4: target allocation failed, error -6
The replacement drive will not be available to the OS until the system
is rebooted after which the drive works like a charm.
The error message is produced in drivers/scsi/scsi_scan.c but i believe
the target_alloc() call comes from the drivers/scsi/mtpsas/mptsas.c
driver. Unfortunately my kernelhack-fu is lacking to look into this
further. As stated, Google has no information about this either.
Anyone on this list with clues as to why this happens or how to
circumvent it from happening with the other three disks?
Thanks,
With regards,
-Sander.
--
| How do you write zero in Roman numerals?
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas
2012-01-20 3:57 ` Nandigama, Nagalakshmi
@ 2012-01-23 13:03 ` Sander Smeenk
0 siblings, 0 replies; 5+ messages in thread
From: Sander Smeenk @ 2012-01-23 13:03 UTC (permalink / raw)
To: linux-scsi@vger.kernel.org
Quoting Nandigama, Nagalakshmi (Nagalakshmi.Nandigama@lsi.com):
Sorry for the delay. We're all busy. :-)
> request you to provide the response of "modinfo mptsas".
> Also please capture the logs with the scsi logging set to 0x180000DB.
> "echo 0x180000db > /proc/sys/dev/scsi/logging_level".
> And mptsas debug level set to 0x3f8
> "echo 3f8 > /sys/module/mptbase/parameters/mpt_debug_level"
This generated a lot of output, please find it in this paste:
http://8n1.org/raw/8314/8fd6
With this disk i did *NOT* do:
| echo 1 >/sys/block/sdN/deviCe/delete
before pulling the old drive from the system. This might well be related
as the new disk was detected properly after inserting and scanning this
time.
Thanks for your time!
With regards,
-Sander.
--
| Do people in Australia call the rest of the world "up over"?
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas
2012-01-18 10:06 scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas Sander Smeenk
2012-01-20 3:57 ` Nandigama, Nagalakshmi
@ 2012-01-31 5:24 ` Nandigama, Nagalakshmi
2012-02-02 12:45 ` Sander Smeenk
1 sibling, 1 reply; 5+ messages in thread
From: Nandigama, Nagalakshmi @ 2012-01-31 5:24 UTC (permalink / raw)
To: Sander Smeenk, linux-scsi@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]
Sander, can you apply the attached patch and redo the test.
Regards,
Nagalakshmi
-----Original Message-----
From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Sander Smeenk
Sent: Wednesday, January 18, 2012 3:37 PM
To: linux-scsi@vger.kernel.org
Subject: scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas
Hi,
i'm experiencing issues while hot(re)plugging SAS-drives in a server
running 2.6.32-37 (stock Ubuntu Lucid). The disks are connected to an
LSI Logic / Symbios Logic SAS1064 PCI-X Fusion-MPT SAS HBA (1000:0500 r2)
Google has no information at all on this specific errormessage.
Situation:
The server is running on 4xSAS drives with the mptsas module, disks are
JBODed to the OS, the OS has them in mdadm software raid.
Each disk needs to be replaced so i unconfigure one in mdadm, ask the
kernel to 'delete' the device node:
| # echo 1 > /sys/block/sdN/device/delete
And then i pull the disk after which the kernel logs:
| scsi: killing requests for dead queue
| scsi target4:0:1: mptsas: ioc0: delete device: fw_channel 0, fw_id 1,
| phy 1, sas_addr 0x500000e019670902
When i reseat the replacement disk, nothing gets logged. When i then ask
the kernel to rescan the scsi bus on host4, the kernel logs an error:
| # echo '- - -' > /sys/class/scsi_host/host4/scan
| scsi target4:0:4: target allocation failed, error -6
The replacement drive will not be available to the OS until the system
is rebooted after which the drive works like a charm.
The error message is produced in drivers/scsi/scsi_scan.c but i believe
the target_alloc() call comes from the drivers/scsi/mtpsas/mptsas.c
driver. Unfortunately my kernelhack-fu is lacking to look into this
further. As stated, Google has no information about this either.
Anyone on this list with clues as to why this happens or how to
circumvent it from happening with the other three disks?
Thanks,
With regards,
-Sander.
--
| How do you write zero in Roman numerals?
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: scsi-misc-2[1].6.git-3e84beba608dee5a7c7711a3503eb2f335c78fca.patch --]
[-- Type: application/octet-stream, Size: 2024 bytes --]
From 3e84beba608dee5a7c7711a3503eb2f335c78fca Mon Sep 17 00:00:00 2001
From: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Date: Wed, 7 Apr 2010 19:17:24 +0900
Subject: [PATCH] [SCSI] mptsas: fixed hot-removal processing
This patch fixes mptsas disk hot-removal processing. The
hot-removal processing doesn't complete because of this condition.
drivers/message/fusion/mptsas.c:
mptsas_taskmgmt_complete()
if ((mptsas_find_vtarget(ioc, channel, id)) && !ioc->fw_events_off)
mptsas_queue_device_delete(...);
mptsas_queue_device_delete(), which must be called for
hot-removal, never gets called because mptsas_find_vtarget()
always returns 0 here. At that time, the vtarget has already
been freed in mptsas_target_destroy(), and also the scsi_device
has been marked as SDEV_DEL.
As a result of the issue, port deletion functions won't get
called and the device ends up being in an incomplete state.
(Some data structures and sysfs entries, which should be
removed in hot-removal, remain.) One side effect of this is
that a hot-addition of the device (bringing the device back
on) fails.
This patch just removes mptsas_find_vtarget() from the if-state
condition.
Signed-off-by: Kei Tokunaga <tokunaga.keiich@jp.fujitsu.com>
Acked-by: "Desai, Kashyap" <Kashyap.Desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
---
drivers/message/fusion/mptsas.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index f42781b..46cc90c 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -1261,7 +1261,7 @@ mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
* enable work queue to remove device from upper layers
*/
list_del(&target_reset_list->list);
- if ((mptsas_find_vtarget(ioc, channel, id)) && !ioc->fw_events_off)
+ if (!ioc->fw_events_off)
mptsas_queue_device_delete(ioc,
&target_reset_list->sas_event_data);
--
1.7.6.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas
2012-01-31 5:24 ` Nandigama, Nagalakshmi
@ 2012-02-02 12:45 ` Sander Smeenk
0 siblings, 0 replies; 5+ messages in thread
From: Sander Smeenk @ 2012-02-02 12:45 UTC (permalink / raw)
To: linux-scsi@vger.kernel.org
Quoting Nandigama, Nagalakshmi (Nagalakshmi.Nandigama@lsi.com):
> Sander, can you apply the attached patch and redo the test.
Thanks a bundle. I had to test this on a different machine but i could
reproduce the problem there too. This patch fixes the issues. The drive
can now be removed an replaced withouth the 'target allocation failed'
messages appearing.
Thanks a lot!
With regards,
-Sander.
--
| Man who scratches ass should not bite fingernail.
| 4096R/20CC6CD2 - 6D40 1A20 B9AA 87D4 84C7 FBD6 F3A9 9442 20CC 6CD2
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-02-02 13:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-18 10:06 scsi_scan.c reports 'target allocation failed, error -6' w/ mptsas Sander Smeenk
2012-01-20 3:57 ` Nandigama, Nagalakshmi
2012-01-23 13:03 ` Sander Smeenk
2012-01-31 5:24 ` Nandigama, Nagalakshmi
2012-02-02 12:45 ` Sander Smeenk
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.