From: Michael Hamilton <michael@actrix.gen.nz>
To: linux-hotplug@vger.kernel.org
Subject: Re: usb-mount (hotplug + desktop hooks)
Date: Mon, 11 Nov 2002 08:11:39 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-103700255620807@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-103558971618973@msgid-missing>
Sounds OK for devices that have a unique GUID. But I also suspect
that if a GUID is unique, then scsi_unique_id will also be unique. Does
anyone know if this is true?
Returning to devices that cannot be uniquely identified. Perhaps devlabel
could assign devices that don't have a unique ID to a series of
predefined generically named symlinks.
Then 'devlabel restart' would first attempt to match and mount newly
inserted devices by matching ID's against known device IDs. Failing a
match, if one or more generic symlinks are defined, it could assign the
device to the first one available.
The generic symlinks would only be used for devices that haven't
been defined by a 'devlabel add'. Whether generics would be allowed
could be determined by the use of a --generic 'devlabel add' option
to create a number of them. The creation of one or two generic
symlinks would also allow devices that haven't been formally added
to be used straight away.
Michael
On Fri, 08 Nov 2002 05:05, Gary_Lerhaupt@Dell.com wrote:
> Here is my solution. Tell me what you think. I'll add a --usb-guid option
> to the devlabel add command. When you try to do an add with --usb-guid, it
> will first grab the SCSI ID and then grab the USB GUID. It will then
> prompt you to remove your USB device. It will then prompt you to reattach
> your USB device. At this point it will confirm that the ID it received
> before is the same ID it is getting now. If both of these match, the add
> will proceed and from then on it will reference the USB GUID to confirm
> consistency.
>
> Unfortunately, this does little for you as your GUIDs are non-unique. In
> your scenario, the --usb-guid add would fail and it wouldn't allow you to
> use the GUID as part of the ID of the device. However, for things like my
> card-reader and properly spec'd USB devices, this would alleviate
> dependence on the 1F00 identifier. Hey, maybe someone might even take the
> initiative to compile a list of USB devices which have true consistent
> GUIDs.
>
> What do you think?
>
> -----Original Message-----
> From: Michael Hamilton [mailto:michael@actrix.gen.nz]
> Sent: Wednesday, November 06, 2002 11:03 PM
> To: Gary_Lerhaupt@exchange.dell.com; a_ajay_sr@yahoo.com
> Cc: Linux-hotplug-devel@lists.sourceforge.net
> Subject: Re: usb-mount (hotplug + desktop hooks)
>
>
> I've already investigated this path. Here's a summary...
>
> I have two identical devices - lets call them A and B to save any
> confusion.
>
> 1) Plug in device A:
> viking2:~ % cat /proc/scsi/usb-storage-0/0
> Host scsi0: usb-storage
> Vendor: Neodio Technologies Corp.
> Product: Neodio USB Storage Device
> Serial Number: 0AEC501000001A002
> Protocol: Transparent SCSI
> Transport: Bulk
> GUID: 0aec5010aec501000001a002
> Attached: Yes
> 2) Unplug device A and plug it in again - note the serial and GUID
> are based on the same attributes - the vendor, product and bus
> location.
> viking2:~ % cat /proc/scsi/usb-storage-0/0
> Host scsi0: usb-storage
> Vendor: Neodio Technologies Corp.
> Product: Neodio USB Storage Device
> Serial Number: 0AEC501000001A003
> Protocol: Transparent SCSI
> Transport: Bulk
> GUID: 0aec5010aec501000001a003
> Attached: Yes
> 3) Plug in device B - note that it has the Serial and GUID we saw
> in step (1) above.
> viking2:~ % cat /proc/scsi/usb-storage-1/0
> Host scsi0: usb-storage
> Vendor: Neodio Technologies Corp.
> Product: Neodio USB Storage Device
> Serial Number: 0AEC501000001A002
> Protocol: Transparent SCSI
> Transport: Bulk
> GUID: 0aec5010aec501000001a002
> Attached: Yes
> 4) Unplug device B and plug it in again- note it now has the same
> serial and GUID as device A which is still plugged in.
> viking2:~ % cat /proc/scsi/usb-storage-1/0
> Host scsi0: usb-storage
> Vendor: Neodio Technologies Corp.
> Product: Neodio USB Storage Device
> Serial Number: 0AEC501000001A003
> Protocol: Transparent SCSI
> Transport: Bulk
> GUID: 0aec5010aec501000001a003
> Attached: Yes
> viking2:~ % cat /proc/scsi/usb-storage-0/0
> Host scsi0: usb-storage
> Vendor: Neodio Technologies Corp.
> Product: Neodio USB Storage Device
> Serial Number: 0AEC501000001A003
> Protocol: Transparent SCSI
> Transport: Bulk
> GUID: 0aec5010aec501000001a003
> Attached: Yes
>
> Not very nice. I guess the scsi device id could be added
> to the serial or GUID to provide a unique identifier that
> will last as long as the device is plugged in.
>
> Michael
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2002-11-11 8:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-25 23:46 usb-mount (hotplug + desktop hooks) David Brownell
2002-10-26 9:35 ` Oliver Neukum
2002-10-28 21:52 ` Gary_Lerhaupt
2002-11-02 23:32 ` Michael Hamilton
2002-11-04 16:38 ` Gary_Lerhaupt
2002-11-05 9:46 ` Michael Hamilton
2002-11-06 4:23 ` Ajay
2002-11-06 9:21 ` Michael Hamilton
2002-11-06 15:53 ` Gary_Lerhaupt
2002-11-07 5:03 ` Michael Hamilton
2002-11-07 16:05 ` Gary_Lerhaupt
2002-11-11 8:11 ` Michael Hamilton [this message]
2002-11-11 15:39 ` Gary_Lerhaupt
2002-11-13 8:55 ` Michael Hamilton
2002-11-21 20:30 ` David Brownell
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=marc-linux-hotplug-103700255620807@msgid-missing \
--to=michael@actrix.gen.nz \
--cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).