From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gary_Lerhaupt@Dell.com Date: Wed, 06 Nov 2002 15:53:29 +0000 Subject: RE: usb-mount (hotplug + desktop hooks) Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org I checked /proc/scsi/usb-storage-0 after plugging in my flashcard reader. In my particular case, the device returned a Serial Number of "None" but did return what appeared to be an interesting and unique GUID value. Michael, did you comments about the non-uniqueness of serial numbers also extend to GUIDs? If not, I could immediately add USB GUIDs where applicable within devlabel and then automounting would be simple. Do your two USB storage devices return different (yet consistent) GUID values? Gary devlabel: www.domsch.com/linux/devlabel -----Original Message----- From: Michael Hamilton [mailto:michael@actrix.gen.nz] Sent: Wednesday, November 06, 2002 3:21 AM To: a_ajay_sr@yahoo.com; Gary_Lerhaupt@exchange.dell.com Cc: Linux-hotplug-devel@lists.sourceforge.net Subject: Re: usb-mount (hotplug + desktop hooks) No, the serial need not be something burned into the device. The device I have makes up a serial number on the fly. Each time it is inserted it appends its position on the bus onto the end of the vendor and product id - so the serial is vendor-product-bus-location. The next time I plug it in the bus-location may differ, so the serial will differ. This sums it up and adds a scary note on uniqeness: Note, that although Matt states that only a few manufacturers have done this, their chipsets may be turning up in many products. There are several products that identify themselves as the same as mine, but they're different kinds of devices: fixed usb-drives, card readers, etc, all sold under different brands. On Wed, 06 Nov 2002 17:23, Ajay wrote: > ... > > The only way I found > > to clear this > > up is to unload the usb-storage module. > > Also, the fact is that /dev/sda, etc. are only > 'relative labels' - i.e. if you had plugged in a > device before the one you're using, _that_ would have > been /dev/sda and your device /dev/sdb, even if the > serial hasn't changed (this after unloading - loading > the usb-storage module). > ... Yes, I understand this. The point I was trying to make was that after I unplug the device, the /dev/sdX remains allocated forever. This is because the serial keeps changing. And, because the serial keeps changing, I keep using more and more /dev/sdX entries. And, as stated, the only way to clear them is to either reboot, or get to a point where usb-storage can be unloaded - that is, unplug all storage devices and then depmod -r usb-storage. This is exacty what my current solutions does - if it sees that there are no devices left on the bus, it removes the module. I was rather surprised by all this - it's a nifty device and a great way to transport stuff to and from client sites, but looking at how it fits into exiting ideas on mouting and partitioning was a real education (see http://users.actrix.co.nz/michael/usbmount.html for details) Michael ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ 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