From owner-freebsd-stable@FreeBSD.ORG Sun Nov 20 21:05:03 2005 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F88A16A41F for ; Sun, 20 Nov 2005 21:05:03 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from orb.pobox.com (orb.pobox.com [207.8.226.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A54F43D46 for ; Sun, 20 Nov 2005 21:05:02 +0000 (GMT) (envelope-from b.candler@pobox.com) Received: from orb (localhost [127.0.0.1]) by orb.pobox.com (Postfix) with ESMTP id C53F9418; Sun, 20 Nov 2005 16:05:23 -0500 (EST) Received: from mappit.local.linnet.org (212-74-113-67.static.dsl.as9105.com [212.74.113.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by orb.sasl.smtp.pobox.com (Postfix) with ESMTP id 8E9118A; Sun, 20 Nov 2005 16:05:22 -0500 (EST) Received: from brian by mappit.local.linnet.org with local (Exim 4.54 (FreeBSD)) id 1EdwMt-0005Ac-DS; Sun, 20 Nov 2005 21:04:59 +0000 Date: Sun, 20 Nov 2005 21:04:59 +0000 From: Brian Candler To: freebsd-stable@freebsd.org Message-ID: <20051120210459.GA19861@uk.tiscali.com> References: <20051116101200.GA2823@uk.tiscali.com> <20051116165712.GB33710@slackbox.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051116165712.GB33710@slackbox.xs4all.nl> User-Agent: Mutt/1.4.2.1i Cc: Subject: Re: CF card and /dev filesystem entries X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2005 21:05:03 -0000 On Wed, Nov 16, 2005 at 05:57:12PM +0100, Roland Smith wrote: > > However, when I insert a CF card with normal partioning I need /dev/da0s1, > > and this is not present in the /dev filesystem because the partition table > > has not been read. > > > The only way I can see to *force* the superblock to be read is to attempt to > > mount the whole device as if it were unpartitioned. This is sufficient to > > cause the /dev/da0s1 entry to appear in the /dev filesystem. > > > At this point, everything works as expected. > > > > My question is: is there an easier or more direct way to cause the partition > > table of the CF card to be read and the /dev filesystem to update? > > Try 'camcontrol rescan all' (as root). No joy. root@billdog brian# ls /dev/da0* /dev/da0 root@billdog brian# camcontrol rescan all Re-scan of bus 0 was successful Re-scan of bus 1 was successful Re-scan of bus 2 was successful Re-scan of bus 3 was successful root@billdog brian# ls /dev/da0* /dev/da0 Another suggestion was: > I think devfs is updated when a descriptor on the device > which was opended for writing is closed. But you don't > actually have to write anything. That means, the following > command should do it: > > # dd if=/dev/null of=/dev/da0 count=0 Now, that does the job: root@billdog brian# dd if=/dev/null of=/dev/da0 count=0 0+0 records in 0+0 records out 0 bytes transferred in 0.000028 secs (0 bytes/sec) root@billdog brian# ls -l /dev/da0* crw-r----- 1 root operator 0, 107 Nov 20 21:00 /dev/da0 crw-r----- 1 root operator 0, 115 Nov 20 21:00 /dev/da0s1 root@billdog brian# However, I'm not sure I actually *like* opening my CF card in such a way that I would be likely to overwrite the partition table if I hit a wrong key... Regards, Brian.