From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 23 21:30:53 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10E3C16A421 for ; Wed, 23 Jan 2008 21:30:53 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 8944213C4D5 for ; Wed, 23 Jan 2008 21:30:52 +0000 (UTC) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id m0NLUokP024522; Wed, 23 Jan 2008 22:30:50 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.13.4/8.13.4) with ESMTP id m0NLUfOd066815 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Jan 2008 22:30:42 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id m0NLUfOd035992; Wed, 23 Jan 2008 22:30:41 +0100 (CET) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id m0NLUfkp035991; Wed, 23 Jan 2008 22:30:41 +0100 (CET) (envelope-from ticso) Date: Wed, 23 Jan 2008 22:30:41 +0100 From: Bernd Walter To: Martin Laabs Message-ID: <20080123213041.GK22192@cicely12.cicely.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, BAYES_00=-2.599 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on cicely12.cicely.de Cc: freebsd-hackers@freebsd.org Subject: Re: update slices on (a)cd devices X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jan 2008 21:30:53 -0000 On Wed, Jan 23, 2008 at 08:19:24PM +0100, Martin Laabs wrote: > Hi, > > I ask the same question some day on -questions before but got > no usefull answer. Since it is also more technical > related I try it here again. > > I created a dvd with two slices a and b. (Don't ask for the > reason - it is a test for my backup system) > This slices are ufs formated and gbde encrypted. However - > if I insert the DVD (and also a read access is done) the device > nodes acd0a and acd0b are not created automaticly. But if > the DVD is inserted *before* boot this two nodes are there > and stay even if I insert a "normal" DVD without slices. > > An other way to update the device nodes is to detach an > attach the ata channel with atacontrol while the "sliced" DVD > is beeing inserted. But this is not very smart. (In particular > if there is i.e. a second device at this channel that is then > disconnected too.) > A similar way it to reload the atapicam modul. In this case > the cd0* device nodes are updated. The problems are the same > as with atacontroll de-/attach. > > So I'am searching for a better way to tell the kernel/devfs > to update the device node list of the atapi devices. Unfortu- > nately I couldn't find a appropiate ioctl in the source of > atacontrol. Since I didn't understand the conecpt of geom > fully now I'm not sure whether geom also handle the > "single" (a)d[0-] and (a)cd[0-] devices and if there is maybe > a geom command for the "slice reread" More or less there is: cp /dev/null /dev/acd0 Not sure if it works for CD's but it works for removeable disks. The problem is that many drives don't tell you about media change, so you have to poll or trigger yourself. -- B.Walter http://www.bwct.de http://www.fizon.de bernd@bwct.de info@bwct.de support@fizon.de