Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jul 2009 11:32:34 +0200
From:      Milan Obuch <freebsd-stable@dino.sk>
To:        freebsd-stable@freebsd.org
Cc:        Ivan Voras <ivoras@freebsd.org>
Subject:   Re: SCSI device not created upon a CF card plug in
Message-ID:  <200907221132.35462.freebsd-stable@dino.sk>
In-Reply-To: <h46fma$k5q$1@ger.gmane.org>
References:  <20090722022027.12059.qmail@us1.tomahawkonline.net> <200907220759.22608.freebsd-stable@dino.sk> <h46fma$k5q$1@ger.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 22 July 2009 09:38:50 Ivan Voras wrote:

[ snip ]

> >> After the CF card is plugged in:
> >> $ ls -l /dev/ | grep da
> >> crw-r-----  1 root    operator    0, 105 Jul 22 13:18 da0
> >> crw-r-----  1 root    operator    0, 106 Jul 22 13:18 da1
> >> crw-r-----  1 root    operator    0, 107 Jul 22 13:18 da2
> >> crw-r-----  1 root    operator    0, 108 Jul 22 13:18 da3
> >>
> >> After reboot while the CF card is plugged in:
> >> $ ls -l /dev/ | grep da
> >> crw-r-----  1 root    operator    0, 105 Jul 22 13:24 da0
> >> crw-r-----  1 root    operator    0, 106 Jul 22 13:24 da1
> >> crw-r-----  1 root    operator    0, 110 Jul 22 13:24 da1s1
> >> crw-r-----  1 root    operator    0, 107 Jul 22 13:24 da2
> >> crw-r-----  1 root    operator    0, 108 Jul 22 13:24 da3
> >>
> >> My questions in this regards are:
> >> 1. Is this an error/bug in FreeBSD 7.2?
> >
> > This is known limitation of, I think, GEOM stack.
>
> No, it is certainly not. What would be the point?
>

Please re-iterate :)

When GEOM is signalled about new device, it tries to understand data 
structures - MBR, partition table, etc. The key is 'when signalled'. So this 
is not limitation of GEOM per se, just missing signalling of new device/data 
media arrival.

> The problem the OP is not that the CF device itself is not detected -
> the device being /dev/da1 - but that the partition on the device (da1s1)
> is not detected. It is possibly malformed.
>

Not true. While not totally clear from original posting, problem is most 
probably no notion of medium (CF) present in reader, similar to medium (CD) 
in CD-ROM drive.

> The OP should nuke the device (overwrite with dd if=/dev/zero
> of=/dev/da1 bs=1m), re-create the partition table and see if that helps.
>

Again, maybe not clear from original posting, most probably this is not 
necessary. To me it looks like commonly used CF with msdosfs. If we are able 
to tell 'new media inserted into reader' event, maybe to devd, we could hook 
simple script fro this event. Problem is, currently, devfs tells 'new device 
umass0 detected', but this does not correspond clearly with 'new device daX 
detected', and, in case of multireader, you can't tell which one (CF, SD, 
other card) is actually inserted.

At least for now, I have no simple idea how to solve this trouble.

Regards,
Milan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907221132.35462.freebsd-stable>