Date: Sun, 20 Nov 2005 14:11:56 -1000 From: Robert Marella <rmarella@gmail.com> To: Brian Candler <B.Candler@pobox.com> Cc: freebsd-stable@freebsd.org Subject: Re: CF card and /dev filesystem entries 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 20 Nov 2005 21:04:59 +0000 Brian Candler <B.Candler@pobox.com> 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. > > <snip> > > > 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. > > <snip> > > > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051120141156.6c424415>