mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: Andries.Brouwer@cwi.nl, dougg@torque.net
Cc: garloff@suse.de, linux-kernel@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: Re: /proc/scsi/map
Date: Sun, 16 Jun 2002 01:00:50 +0200 (MEST)	[thread overview]
Message-ID: <UTC200206152300.g5FN0oI14286.aeb@smtp.cwi.nl> (raw)

    From dougg@torque.net  Sat Jun 15 23:10:06 2002

    In the lsml "[RFC] Persistent naming of scsi devices" thread
    Martin K. Petersen <mkp@mkp.net> summarized scsi addressing issues
    thus:
    #
    # What we want is (at least) three ways of addressing a device:
    #
    # 1. By content.  This is the persistent naming.  Think
    #    filesystem/MD/LVM UUID.  This is what you put in /etc/fstab and
    #    what metadisk systems use to assemble logical volumes.
    #
    #    Content referencing is used for accessing data.
    #
    # 2. By physical path.  This naming is not persistent.  Not even runtime
    #    because hotplug, iSCSI and whatnot may mess things up.
    #
    #    Path naming is for discovery and recovery.  When you add an
    #    unlabeled disk you want to reference it by path to give it a name.
    #    When you have a failed disk on your system you want to know which
    #    physical device to pull from the array.
    #
    # 3. By enumeration.  This is what the kernel happens to be using to
    #    reference the device.  diskN.  Certainly not persistent.
    #
    #    Enumeration is for the kernel.

Yes, a very nice summary. Maybe also

# 4. By fingerprint.  This naming is persistent, but need not
#    identify the device uniquely.  Think device type, vendor,
#    serial number, capacity.
#
#    Fingerprints are convenient for the user. "My ZIP drive".


    The /proc/scsi/map facility proposed by Kurt does a very
    good job at tying together points 2) and 3) .

Yes. Or, more precisely, it ties together the name sde and the
path (C,B,T,U) = (3,0,00,01). However, this path is not very
"physical". Indeed, these four numbers all arose by enumeration -
they are kernel numbers for some usb-storage device.

I can find the physical path, but that requires quite some digging in
/proc/scsi/scsi and /proc/scsi/sg/host_strs and /proc/scsi/usb-storage*/*
and /proc/bus/usb/devices.


    > Very good - in combination with /proc/scsi/scsi this gives
    > good information. I like it.

    Adding INQUIRY strings would make it harder to parse and more
    cluttered for humans to read.

Yes, I would like to leave that to a user-space utility.
Writing that will also show what kernel facilities are missing.

    > But just "cat /proc/scsi/map" is not good enough.
    > From the above output alone one cannot easily guess which is which.
    > One would need a small utility that reads /proc/scsi/map and
    > /proc/scsi/scsi and produces something readable.

    Note the possible race condition: reading /proc/scsi/scsi
    then /proc/scsi/map (or vice versa) when a hotplug is
    occurring...

Already reading /proc/scsi/map has a race: no locking is done.

    > Will add sth to util-linux in case this gets accepted.

    IMO as soon as lk 2.4.19 comes out, this patch should
    be presented to Marcelo (for inclusion in lk 2.4.20).

Yes, perhaps. I would like to get some experience first,
play with it, see what information is missing.

I have to admit that 2.5 is not very suitable for development
these days, it is not stable enough, but the appropriate path
is to try things out in 2.5 first, and when something crystallizes
out, backport.

    The sooner we get it into the lk 2.5 series the better. Could you 
    forward your lk 2.5 version of Kurt's patch to Linus (and the
    linux-scsi list)?

Yes, but I'll wait for 2.5.22 so that it is clear against
what tree to diff.

Andries

             reply	other threads:[~2002-06-15 23:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-15 23:00 Andries.Brouwer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-18 20:06 /proc/scsi/map Chris Adams
2002-06-18 20:25 ` /proc/scsi/map Andreas Dilger
2002-06-17 12:55 /proc/scsi/map Heinz, Michael
2002-06-16 15:59 /proc/scsi/map Borsenkow Andrej
2002-06-15 21:54 /proc/scsi/map Andries.Brouwer
2002-06-15 22:27 ` /proc/scsi/map Douglas Gilbert
2002-06-15 22:40   ` /proc/scsi/map Sancho Dauskardt
2002-06-16 20:36     ` /proc/scsi/map Kurt Garloff
2002-06-15 22:28 ` /proc/scsi/map Sancho Dauskardt
2002-06-15 21:08 /proc/scsi/map Douglas Gilbert
2002-06-15 16:04 /proc/scsi/map Andries.Brouwer
2002-06-16 21:04 ` /proc/scsi/map Kurt Garloff
     [not found] <garloff@suse.de>
2002-06-15 13:36 ` /proc/scsi/map Kurt Garloff
2002-06-15 14:08   ` /proc/scsi/map John Summerfield
2002-06-17 11:33     ` /proc/scsi/map Kurt Garloff
2002-06-15 15:52   ` /proc/scsi/map Richard Gooch
2002-06-16 19:41     ` /proc/scsi/map Kurt Garloff
2002-06-17 17:49       ` /proc/scsi/map Ingo Oeser
2002-06-15 19:49   ` /proc/scsi/map Sancho Dauskardt
2002-06-16 19:24   ` /proc/scsi/map Albert D. Cahalan
2002-06-16 21:22     ` /proc/scsi/map Kurt Garloff
2002-06-17 20:35   ` /proc/scsi/map Patrick Mansfield
2002-06-17 20:57     ` /proc/scsi/map Kurt Garloff
2002-06-17 21:47       ` /proc/scsi/map Patrick Mansfield
2002-06-17 22:08   ` /proc/scsi/map Doug Ledford
2002-06-17 23:06     ` /proc/scsi/map Kurt Garloff
2002-06-18  2:40       ` /proc/scsi/map Doug Ledford
2002-06-18  4:32         ` /proc/scsi/map Douglas Gilbert
2002-06-18  5:12           ` /proc/scsi/map Doug Ledford
2002-06-18  9:03         ` /proc/scsi/map Kurt Garloff

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=UTC200206152300.g5FN0oI14286.aeb@smtp.cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=dougg@torque.net \
    --cc=garloff@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®