From owner-freebsd-mobile@FreeBSD.ORG Tue Jan 18 11:18:01 2005 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C64D16A4CE for ; Tue, 18 Jan 2005 11:18:01 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 774AB43D2D for ; Tue, 18 Jan 2005 11:18:00 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j0IBHsHo019084 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 18 Jan 2005 12:17:57 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j0IBGhU3035574 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Jan 2005 12:16:43 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j0IBGgQQ084881; Tue, 18 Jan 2005 12:16:42 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j0IBGePl084880; Tue, 18 Jan 2005 12:16:40 +0100 (CET) (envelope-from ticso) Date: Tue, 18 Jan 2005 12:16:39 +0100 From: Bernd Walter To: Robert Blacquiere Message-ID: <20050118111639.GQ64575@cicely12.cicely.de> References: <20050118103612.GA61467@bombur.guldan.demon.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050118103612.GA61467@bombur.guldan.demon.nl> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=ham version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: freebsd-mobile@freebsd.org Subject: Re: static umass numbering X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2005 11:18:01 -0000 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