Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Jan 2005 12:16:39 +0100
From:      Bernd Walter <ticso@cicely12.cicely.de>
To:        Robert Blacquiere <freebsd@guldan.demon.nl>
Cc:        freebsd-mobile@freebsd.org
Subject:   Re: static umass numbering
Message-ID:  <20050118111639.GQ64575@cicely12.cicely.de>
In-Reply-To: <20050118103612.GA61467@bombur.guldan.demon.nl>
References:  <20050118103612.GA61467@bombur.guldan.demon.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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
bernd@bwct.de                                  info@bwct.de



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050118111639.GQ64575>