From owner-freebsd-hackers@FreeBSD.ORG Fri Jun 10 05:34:53 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E842C16A41C for ; Fri, 10 Jun 2005 05:34:53 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (berlin-qwest.village.org [168.103.84.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1345543D49 for ; Fri, 10 Jun 2005 05:34:52 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j5A5XRwu043151; Thu, 9 Jun 2005 23:33:27 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 09 Jun 2005 23:34:24 -0600 (MDT) Message-Id: <20050609.233424.42500001.imp@bsdimp.com> To: dmp@bitfreak.org From: "M. Warner Losh" In-Reply-To: <000001c56d5f$efe5c260$0a2a15ac@SMILEY> References: <000001c56d5f$efe5c260$0a2a15ac@SMILEY> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Determining disk device and kicking GEOM when doing automatic mounting of umass devices X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2005 05:34:54 -0000 In message: <000001c56d5f$efe5c260$0a2a15ac@SMILEY> "Darren Pilgrim" writes: : These tricks are ridiculous, IMO. There has to be a more intelligent means : of going about this. How do I get the scsi disk device name created for a : umass device as soon as it's created? How do I inform GEOM that it needs to : add a new MBR to it's configuration and create the appropriate /dev/da?s* : devices? One way is to make devd grok devices arriving and leaving from /dev. One could kludge it to send out geom events, but I think that's insufficiently general since it reports too many things that aren't of interest. Of course, you have no way of knowing what entries in /dev really are, apart from pattern matching. As to your second question, GEOM and/or da (it depends on who you ask) need to react to certain events and re-taste the device. This isn't done automatically, especially when da0 changes from a 32MB to a 64MB part, for reasons I've never known. Warner