From owner-freebsd-stable@FreeBSD.ORG Mon Nov 21 00:12: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 2322916A41F for ; Mon, 21 Nov 2005 00:12:03 +0000 (GMT) (envelope-from rmarella@gmail.com) Received: from ms-smtp-01-eri0.socal.rr.com (ms-smtp-01-qfe0.socal.rr.com [66.75.162.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66D1C43D62 for ; Mon, 21 Nov 2005 00:12:02 +0000 (GMT) (envelope-from rmarella@gmail.com) Received: from frankie.konav201.local (cpe-66-8-187-40.hawaii.res.rr.com [66.8.187.40]) by ms-smtp-01-eri0.socal.rr.com (8.12.10/8.12.7) with ESMTP id jAL0Bv7t017098; Sun, 20 Nov 2005 16:11:57 -0800 (PST) Date: Sun, 20 Nov 2005 14:11:56 -1000 From: Robert Marella To: Brian Candler Message-ID: <20051120141156.6c424415@frankie.konav201.local> In-Reply-To: <20051120210459.GA19861@uk.tiscali.com> References: <20051116101200.GA2823@uk.tiscali.com> <20051116165712.GB33710@slackbox.xs4all.nl> <20051120210459.GA19861@uk.tiscali.com> X-Mailer: Sylpheed-Claws 1.9.100 (GTK+ 2.8.7; i386-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine Cc: freebsd-stable@freebsd.org 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: Mon, 21 Nov 2005 00:12:03 -0000 On Sun, 20 Nov 2005 21:04:59 +0000 Brian Candler wrote: > 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. > I am not sure if this is any different but when placing or changing a card in my card reader I run " cat /dev/null > /dev/daX" before mounting. I have cards of different sizes and it would fail to mount a different size card without doing the above first. Good Luck Robert