On Sun, 20 Nov 2005 21:04:59 +0000
Brian Candler <[EMAIL PROTECTED]> 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.
> 
> [EMAIL PROTECTED] brian# ls /dev/da0*
> /dev/da0
> [EMAIL PROTECTED] 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
> [EMAIL PROTECTED] 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:
> 
> [EMAIL PROTECTED] 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)
> [EMAIL PROTECTED] 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
> [EMAIL PROTECTED] 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
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to