Re: static umass numbering

Bernd Walter <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
On Tue, Jan 18, 2005 at 11:36:12AM +0100, Robert Blacquiere wrote:
> Hi folks,
> 
> I have got a couple of usb mass storage devices which work nicely with FreeBSD.
> But they are numbered chronological on insertion. I would like some sort of
> static numbering scheme for easing up for example automounting. 
> Now i use a hand script which take de base da[0-9]+ numbering as var but hate 
> this way of working. 
> 
> Does anybody know a more lazy way to do such thing?

Unfortunately there is no easy way.
Hardwiring as such is impossible with USB devices.

You can camcontrol -v to get a clue about which da* is part of which
umass* device.

With devinfo -v you get the serial number of each umass device (if your
devices have serial numbers) and the connection tree.

You can use devd to get an attach/detach notifications to setup
softlinks in /dev which point to the changing nodenames.
Unfortunately devd is started befor /usr is mounted so the tools you
can use in devd scripts are limited.
In case of automounting I would suggest you identify the device at
mount time instead of going the devd way.

This is with 5.3 and current - under FreeBSD 4 things are a bit more
complicated.

happy scripting...

-- 
B.Walter                   BWCT                http://www.bwct.de
[email protected]                                  [email protected]

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.