From owner-freebsd-questions@FreeBSD.ORG Wed May 23 00:10:13 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35EA716A4C2 for ; Wed, 23 May 2007 00:10:13 +0000 (UTC) (envelope-from mikhailg@webanoide.org) Received: from shanshito.webanoide.org (shanshito.webanoide.org [150.101.108.110]) by mx1.freebsd.org (Postfix) with ESMTP id 9EB1413C45D for ; Wed, 23 May 2007 00:10:12 +0000 (UTC) (envelope-from mikhailg@webanoide.org) Received: from maxito.hba.navalradio.cl (maxito.hba.navalradio.cl [172.26.4.34]) (authenticated bits=0) by shanshito.webanoide.org (8.13.8/8.13.8) with ESMTP id l4N0A7uC032214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 23 May 2007 00:10:09 GMT (envelope-from mikhailg@webanoide.org) Message-ID: <4653865E.1090804@webanoide.org> Date: Wed, 23 May 2007 10:10:06 +1000 From: Mikhail Goriachev Organization: Webanoide User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: "illoai@gmail.com" References: <464F6917.9080301@acm.org> <1d3ed48c0705191728s54ef146do63d5186bcf8e9e8b@mail.gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Kevin Downey , freebsd-questions@freebsd.org Subject: Re: Assignment of device names to external USB drives X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 May 2007 00:10:13 -0000 illoai@gmail.com wrote: > On 19/05/07, Kevin Downey wrote: >> On 5/19/07, Denis Fortin wrote: >>> Greetings, >>> >>> I am trying to set up a backup server, using a combination of internal >>> and external (USB) disk drives. >>> >>> How can I manage the mapping of USB disk drives to device names? i.e. >>> USB drives get assigned device names like da0, da1, da2... when they are >>> detected. But if one of the drives fails or is not powered up, all >>> other ones will get bumped down one in the list next time I reboot. >>> >>> The problem is that if I automatically "mount /dev/da0a >>> /archive/volume1", "mount /dev/da1a /archive/volume2", etc. I run the >>> risk of having the wrong disk being mounted on a mount point !?! >>> >>> Is there an obvious solution that I'm missing, or a canonical workaround >>> to this problem? >>> >> when you newfs a drive use the -L flag to give it a label like >> 'VOLUME1' then if you load the geom_label module that drive becomes >> availble under /dev/ufs/VOLUME1 > > Or, if instead of fdisk, you > # glabel label disk0 da0 > # bsdlabel -w label/fancy0 > # newfs -U label/fancy0a > # mount /dev/label/fancy0a /bla > In addition, you can modify an already created filesystem (as described in glabel(8)): # tunefs -L data /dev/da4s1a Read the glabel(8) and loader.conf(5) man pages. Regards, Mikhail. -- Mikhail Goriachev Webanoide Telephone: +61 (0)3 62252501 Mobile Phone: +61 (0)4 38255158 E-Mail: mikhailg@webanoide.org Web: www.webanoide.org