* [PATCH] 4/6: scsi_allow_ghost_devices
@ 2004-04-18 18:59 Kurt Garloff
2004-04-18 19:20 ` Christoph Hellwig
0 siblings, 1 reply; 8+ messages in thread
From: Kurt Garloff @ 2004-04-18 18:59 UTC (permalink / raw)
To: Linux SCSI list; +Cc: James Bottomley, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 1726 bytes --]
Feature.
scsi_allow_ghost_devices=N
This patch introduces a boot/module parameter that allows the user to tell
the kernel to NOT set the first N devices to offline despite they would
normally be. Needed for some EMC multipathing devices.
This parameter is even documented in EMC docs as both RH and SUSE had
such a parameter in their 2.4 vendor kernels :-/
--- linux-2.6.5.noreplunhost/drivers/scsi/scsi_scan.c.orig 2004-04-15 22:42:48.544207000 +0200
+++ linux-2.6.5.noreplunhost/drivers/scsi/scsi_scan.c 2004-04-15 22:51:08.291252857 +0200
@@ -119,6 +119,12 @@ module_param_named(scsi_reportlun2, scsi
MODULE_PARM_DESC(scsi_reportlun2,
"Use REPORT_LUNs for scanning SCSI-2 devs as well");
+static unsigned int scsi_allow_ghost_devices;
+module_param_named(scsi_allow_ghost_devices ,scsi_allow_ghost_devices, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(scsi_allow_ghost_devices,
+ "allow devices marked as being offline to be accessed anyway "
+ "(0 = off, else allow ghosts on lun 0 through allow_ghost_devices - 1");
+
/**
* scsi_unlock_floptical - unlock device via a special MODE SENSE command
@@ -573,7 +579,8 @@ static int scsi_add_lun(struct scsi_devi
* otherwise, offline devices still get an sd allocated, and they
* use up an sd slot.
*/
- if (((inq_result[0] >> 5) & 7) == 1) {
+ if (((inq_result[0] >> 5) & 7) == 1 &&
+ (sdev->lun >= scsi_allow_ghost_devices)) {
SCSI_LOG_SCAN_BUS(3, printk(KERN_INFO "scsi scan: peripheral"
" qualifier of 1, device offlined\n"));
sdev->online = FALSE;
--
Kurt Garloff <garloff@suse.de> Cologne, DE
SUSE LINUX AG, Nuernberg, DE SUSE Labs (Head)
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] 4/6: scsi_allow_ghost_devices
2004-04-18 18:59 [PATCH] 4/6: scsi_allow_ghost_devices Kurt Garloff
@ 2004-04-18 19:20 ` Christoph Hellwig
2004-04-18 22:14 ` Kurt Garloff
2004-04-19 7:34 ` Arjan van de Ven
0 siblings, 2 replies; 8+ messages in thread
From: Christoph Hellwig @ 2004-04-18 19:20 UTC (permalink / raw)
To: Kurt Garloff, Linux SCSI list, James Bottomley, Andrew Morton
On Sun, Apr 18, 2004 at 08:59:50PM +0200, Kurt Garloff wrote:
>
> Feature.
>
> scsi_allow_ghost_devices=N
> This patch introduces a boot/module parameter that allows the user to tell
> the kernel to NOT set the first N devices to offline despite they would
> normally be. Needed for some EMC multipathing devices.
> This parameter is even documented in EMC docs as both RH and SUSE had
> such a parameter in their 2.4 vendor kernels :-/
I'm very unhappy with that. Could you explain why EMC needs this?
And even if we have to work around it I'd rather use the blacklist mechanism
for this.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] 4/6: scsi_allow_ghost_devices
2004-04-18 19:20 ` Christoph Hellwig
@ 2004-04-18 22:14 ` Kurt Garloff
2004-04-19 7:34 ` Arjan van de Ven
1 sibling, 0 replies; 8+ messages in thread
From: Kurt Garloff @ 2004-04-18 22:14 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Linux SCSI list
[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]
On Sun, Apr 18, 2004 at 08:20:22PM +0100, Christoph Hellwig wrote:
> On Sun, Apr 18, 2004 at 08:59:50PM +0200, Kurt Garloff wrote:
> > scsi_allow_ghost_devices=N
> > This patch introduces a boot/module parameter that allows the user to tell
> > the kernel to NOT set the first N devices to offline despite they would
> > normally be. Needed for some EMC multipathing devices.
> > This parameter is even documented in EMC docs as both RH and SUSE had
> > such a parameter in their 2.4 vendor kernels :-/
>
> I'm very unhappy with that.
So am I.
But there's compromises you have to take ...
> Could you explain why EMC needs this?
Hmm, it's some time ago.
The LUN 0 is used for multipathing and becomes active if another path
fails. Something they use in PowerPath IIRC.
> And even if we have to work around it I'd rather use the blacklist mechanism
> for this.
There's no bits left :-(
There's one difference: The parameter could be used to set more LUNs
unconditionally to online, though I believe EMC only needs LUN 0.
Regards,
--
Kurt Garloff <kurt@garloff.de> [Koeln, DE]
Physics:Plasma modeling <garloff@plasimo.phys.tue.nl> [TU Eindhoven, NL]
Linux: SUSE Labs (Head) <garloff@suse.de> [SUSE Nuernberg, DE]
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] 4/6: scsi_allow_ghost_devices
2004-04-18 19:20 ` Christoph Hellwig
2004-04-18 22:14 ` Kurt Garloff
@ 2004-04-19 7:34 ` Arjan van de Ven
2004-04-19 12:06 ` Doug Ledford
1 sibling, 1 reply; 8+ messages in thread
From: Arjan van de Ven @ 2004-04-19 7:34 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Kurt Garloff, Linux SCSI list, James Bottomley, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
> I'm very unhappy with that. Could you explain why EMC needs this?
> And even if we have to work around it I'd rather use the blacklist mechanism
> for this.
they allow the admin to config the box without a lun 0....
I 100% agree it's blacklist material.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] 4/6: scsi_allow_ghost_devices
2004-04-19 7:34 ` Arjan van de Ven
@ 2004-04-19 12:06 ` Doug Ledford
2004-04-19 12:14 ` Christoph Hellwig
0 siblings, 1 reply; 8+ messages in thread
From: Doug Ledford @ 2004-04-19 12:06 UTC (permalink / raw)
To: Arjan Van de Ven
Cc: Christoph Hellwig, Kurt Garloff, Linux SCSI list, James Bottomley,
Andrew Morton
On Mon, 2004-04-19 at 03:34, Arjan van de Ven wrote:
> > I'm very unhappy with that. Could you explain why EMC needs this?
> > And even if we have to work around it I'd rather use the blacklist mechanism
> > for this.
>
> they allow the admin to config the box without a lun 0....
> I 100% agree it's blacklist material.
Actually, the original reason for the patch was the fact that some
external boxes use LUN 0 as a control device that you send commands to
in order to init logical volumes. Without access to the control device
(which previously was always shown as offline), you couldn't set the box
up with any linux tools, you would have to set up the logical volumes
under Windows then boot into linux to see them. Since the LUN 0 device
wasn't really offline, but instead was reported as a disk device with no
attached physical device, this patch was created to allow the linux
kernel to send commands to the control device.
--
Doug Ledford <dledford@redhat.com> 919-754-3700 x44233
Red Hat, Inc.
1801 Varsity Dr.
Raleigh, NC 27606
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] 4/6: scsi_allow_ghost_devices
2004-04-19 12:06 ` Doug Ledford
@ 2004-04-19 12:14 ` Christoph Hellwig
2004-04-19 13:34 ` Matthew Wilcox
0 siblings, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2004-04-19 12:14 UTC (permalink / raw)
To: Doug Ledford
Cc: Arjan Van de Ven, Kurt Garloff, Linux SCSI list, James Bottomley,
Andrew Morton
On Mon, Apr 19, 2004 at 08:06:22AM -0400, Doug Ledford wrote:
> Actually, the original reason for the patch was the fact that some
> external boxes use LUN 0 as a control device that you send commands to
> in order to init logical volumes. Without access to the control device
> (which previously was always shown as offline), you couldn't set the box
> up with any linux tools, you would have to set up the logical volumes
> under Windows then boot into linux to see them. Since the LUN 0 device
> wasn't really offline, but instead was reported as a disk device with no
> attached physical device, this patch was created to allow the linux
> kernel to send commands to the control device.
Man is that a horrible cludge. Can't one of the EMC folks on this list
kick their firmware group to fix this horrible crap? I.e. make lun a non-disk
device that can be accessed by sg and isn't marked offline? It can't be
_that_ difficult. And btw, what tools actually need that access, does some
have pointers to a tarball - I really wonder what they do.
Yeah, Enterprise storage. I wonder why people trust EMC to even design
a loo cover.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] 4/6: scsi_allow_ghost_devices
2004-04-19 12:14 ` Christoph Hellwig
@ 2004-04-19 13:34 ` Matthew Wilcox
2004-04-20 17:34 ` Patrick Mansfield
0 siblings, 1 reply; 8+ messages in thread
From: Matthew Wilcox @ 2004-04-19 13:34 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Doug Ledford, Arjan Van de Ven, Kurt Garloff, Linux SCSI list,
James Bottomley, Andrew Morton
On Mon, Apr 19, 2004 at 01:14:10PM +0100, Christoph Hellwig wrote:
> Yeah, Enterprise storage. I wonder why people trust EMC to even design
> a loo cover.
Enterprise storage is like an Enterprise kernel -- stuffed with all
kinds of shit that nobody in their right mind would want.
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] 4/6: scsi_allow_ghost_devices
2004-04-19 13:34 ` Matthew Wilcox
@ 2004-04-20 17:34 ` Patrick Mansfield
0 siblings, 0 replies; 8+ messages in thread
From: Patrick Mansfield @ 2004-04-20 17:34 UTC (permalink / raw)
To: Matthew Wilcox
Cc: Christoph Hellwig, Doug Ledford, Arjan Van de Ven, Kurt Garloff,
Linux SCSI list, James Bottomley, Andrew Morton
Here's EMC's post in the archives describing the original problem:
http://marc.theaimsgroup.com/?t=99790431900006&r=1&w=2
A better method is to not mark it offline, and have sd_probe not attach
based on the PQ fields, like Mike Anderson and (I thought) Doug Ledford
had proposed:
http://marc.theaimsgroup.com/?l=linux-scsi&m=99837483305810&w=2
Above patch should be modified to check the scsi_device inquiry data
rather than store the PQ separately. This method also means we don't have
offlined devices showing up under sd.
-- Patrick Mansfield
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-04-20 17:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-18 18:59 [PATCH] 4/6: scsi_allow_ghost_devices Kurt Garloff
2004-04-18 19:20 ` Christoph Hellwig
2004-04-18 22:14 ` Kurt Garloff
2004-04-19 7:34 ` Arjan van de Ven
2004-04-19 12:06 ` Doug Ledford
2004-04-19 12:14 ` Christoph Hellwig
2004-04-19 13:34 ` Matthew Wilcox
2004-04-20 17:34 ` Patrick Mansfield
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox