All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luben Tuikov <ltuikov@yahoo.com>
To: Jeff Garzik <jeff@garzik.org>, Michael Reed <mdr@sgi.com>
Cc: James.Smart@Emulex.Com, linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: generating a Linux WWN?
Date: Tue, 2 Oct 2007 16:47:40 -0700 (PDT)	[thread overview]
Message-ID: <842443.13470.qm@web31811.mail.mud.yahoo.com> (raw)
In-Reply-To: <46FC38F2.2070206@garzik.org>

--- Jeff Garzik <jeff@garzik.org> wrote:
> Michael Reed wrote:
> 
> > as having a unique WWN should be a product requirement, is an indicator of
> > a problem.  Shouldn't the proper solution be to have the card repaired?
> > Arbitrarily assigning a WWN could mask or introduce other problems, in particular
> > with regard to storage connectivity.

This is absolutely correct.

> If you are an admin suffering from the /common/ problem of missing or 
> invalid NVRAM, would you rather wait for card repair or get it going 
> immediately?

If you have a SAS HA, and it is missing its NVRAM (erased, etc), then
this is something catastrophic, and you have much bigger problems to solve
than just to "generate" a WWN.

It is extremely, extremely *uncommon* for SAS HA to be missing their
manufacturing sector/NVRAM, for products out in the field.  Internally
bound HAs, for testing, validation, etc, may be missing their MS/NVRAM,
but those products are never supposed to leave the testing/validation
process, without the "packager" writing their MS/NVRAM into the device.

> The standard Linux policy for unique ids like ethernet MAC has been, for 
> the 98% case where you have a useful MAC from the hardware, of course 
> use it.  For the 2% case, you give the admin solutions for supplying a 
> useful MAC.

So the same rule of principle applies to SAS HAs, to quote:
   "you give the admin solutions for supplying a useful WWN [was: MAC]"

If the SAS HA does NOT have a WWN, then you'll just complain in the
kernel log, and not start it up, unless the admin has provided one
via kernel/module parameter.

In the case where a WWN is missing, it is essential that userspace
provides a WWN to the driver, possibly via a kernel/module parameter,
and then the driver will use that WWN to assign to the HA.

But you MUST NOT establish policy by "generating" it internally in the
kernel.  I know it would be "cool", but it is unsound.  So instead,
establish mechanism.

> Mirroring decades of ethernet NIC history, the HBA silicon and the 
> source of the unique id are most often vastly different.  Normally it is 
> a different chip on the same board, but sometimes the unique id source 
> is not on the same board at all.
> 
> For those reasons and more, Linux users have a LONG history of running 
> into situations where, for one reason or another, their silicon is fine 
> but their unique id is not.  I've heard them all:
> 	- hw from government auction, had NVRAM intentionally wiped
> 	- hw resale w/ NVRAM wiped by paranoid corporate IT staff
> 	- hw with NVRAM chip missing
> 	- old hw out of warranty
> 	- old dev kit (they rarely ship with useful NVRAM data)
> 	- and plenty more
> 
> We have to behave sanely in the 2% case.  "refuse to operate" is just 
> not an option, when this problem case is so historically clear, and so 
> easy to work around.
> 
> Linux drivers have to continue operating long after support contracts 
> run out, long after chip EOL, and sometimes, long after companies go out 
> of business.

This still does not justify "let's generate it in the kernel".
If the MS/NVRAM is missing and thus there is no hw WWN, then it
should be left to the admin to provide one via a kernel/module option.

   Luben


  reply	other threads:[~2007-10-02 23:47 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-27 10:04 generating a Linux WWN? Jeff Garzik
2007-09-27 13:55 ` Michael Reed
2007-09-27 14:04 ` James Smart
2007-09-27 14:16   ` Patrick_Boyd
2007-09-27 14:46     ` Matthew Wilcox
2007-09-27 15:07       ` Michael Reed
2007-09-27 15:12         ` Michael Reed
2007-09-27 23:40         ` Jeff Garzik
2007-09-27 22:48       ` Jeff Garzik
2007-10-01 10:56         ` Andi Kleen
2007-09-27 14:19   ` Jeff Garzik
2007-09-27 14:29     ` Michael Reed
2007-09-27 15:30       ` Douglas Gilbert
2007-09-27 22:32         ` Jeff Garzik
2007-09-27 23:12       ` Jeff Garzik
2007-10-02 23:47         ` Luben Tuikov [this message]
2007-10-03  0:35           ` Jeff Garzik
2007-10-03  3:45             ` Luben Tuikov
2007-10-03  4:15               ` Jeff Garzik
2007-10-03  5:12                 ` Luben Tuikov
2007-10-03  5:25                   ` Jeff Garzik
2007-10-03  5:31                     ` Luben Tuikov
2007-10-03  5:45                       ` Jeff Garzik
2007-10-03 14:59                         ` Douglas Gilbert
2007-10-03 16:16                           ` Jeff Garzik
2007-10-03 18:02                         ` Matthew Jacob
2007-10-03 18:09                           ` Jeff Garzik
2007-10-03 19:44                             ` Luben Tuikov
2007-10-03 20:25                               ` Jeff Garzik
2007-10-03 22:08                                 ` Luben Tuikov
2007-10-03 22:17                                   ` David Miller
2007-10-04  0:11                                     ` Luben Tuikov
2007-10-04  3:23                                       ` Matthew Jacob
2007-10-04  3:27                                         ` Jeff Garzik
2007-10-04  3:33                                         ` Matthew Wilcox
2007-10-05 22:09                                     ` James Bottomley
2007-10-05 22:11                                       ` David Miller
2007-10-05 22:14                                         ` James Bottomley
2007-10-05 22:17                                           ` David Miller
2007-10-05 22:41                                             ` Jeff Garzik
2007-10-05 22:49                                               ` David Miller
2007-10-05 22:52                                                 ` Jeff Garzik
2007-10-06 14:11                                             ` James Bottomley
2007-10-06 14:36                                               ` Jeff Garzik
2007-10-06 15:04                                                 ` James Bottomley
2007-10-06 15:23                                                   ` Jeff Garzik
2007-10-06 15:33                                                     ` James Bottomley
2007-10-06 15:42                                                       ` Jeff Garzik
2007-10-08 18:42                                                     ` Luben Tuikov
2007-10-07  2:48                                                   ` David Miller
2007-10-08 15:41                                                     ` Michael Reed
2007-10-08 18:34                                                 ` Luben Tuikov
2007-10-07  2:46                                               ` David Miller
2007-10-08 18:18                                       ` Luben Tuikov
2007-10-03  5:38                     ` Luben Tuikov
2007-10-03  5:47                       ` Jeff Garzik
2007-10-03 15:33                         ` Michael Reed
2007-10-03 16:02                           ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=842443.13470.qm@web31811.mail.mud.yahoo.com \
    --to=ltuikov@yahoo.com \
    --cc=James.Smart@Emulex.Com \
    --cc=jeff@garzik.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mdr@sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.