FreeBSD 8.2-PRERELASE doesn't see slice on SDHC card in ?cardreader ?-- what should I do?

Oliver Fromme olli at lurza.secnetix.de
Thu Dec 23 13:47:49 UTC 2010


Lev Serebryakov wrote:
 > Oliver Fromme wrote:
 > > Lev Serebryakov <lev at serebryakov.spb.ru> wrote:
 > > >   It  works!  But  it  is  not intiutive at all :)
 > > 
 > > The command opens the device for writing (but it doesn't
 > > actually write anything), and closes it immediately.
 > > This causes the GEOM system to read and "taste" the
 > > device and look for new slices or partitions.
 > 
 > I understand, what these command do, but geom retaste is not obvious
 > result and it is not obvious, that it is proper (and easiest) way to
 > trigger re-taste.

Right, it is not obvious, and it's not really "proper".
It's rather a bad hack.  But it's currently the only work-
around that exists, AFAIK.

Of course, I *do* agree that there should be a better way
to do it.

 > > >   Why all CAM-related commands like "load" and "open" don't work
 > > 
 > > All of those commands are only related to the hardware,
 > > i.e. SCSI busses and devices.  They are not related to
 > > the _content_ of the device (slices etc.).
 > 
 > Yes, but each device is geom_disk, and re-scanning hardware level
 > could trigger re-taste, starting from releant geom_disks. It looks
 > resonable.

The problem is that nothing has changed, from the hardware
point of view.  The SCSI re-scan did not encounter any new
devices or anything else, so there doesn't _seem_ to be a
reason to re-taste everything.

 > > >   (I don't mention auto-sensing  ;-))?  Is it problem with my
 > > >   cardreader or common problem for FreeBSD?
 > > 
 > > The main problem here is that there is no notification
 > > mechanism when you insert an SD card (the same is true
 > > for floppy disks and CD drives, by the way, but it's less
 > > of a problem because they usually don't have slices).
 > 
 > It is strange. Any SD card reader has spring contacts, which
 > detects card insertion. Does cardreader pass this signal?

No.  As far as I know, USB mass storage devices cannot send
anything on their own.  They can only send replies when
being asked by the USB host.  So the host would have to
poll for a change in regular intervals, which is not really
optimal either.

 > And I'm sure, that SCSI (and ATAPI, as ATAPI is SCSI-commands-
 > over-ATA) CD-ROM drives has "media changed" signal.

Yes, but only if you actively poll for it (which can have
undesirable side effects, like drive LED flashing, or
clicking sounds from the drive's motor).  There is no
notification like an interrupt signal or something like
that.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"The ITU has offered the IETF formal alignment with its
corresponding technology, Penguins, but that won't fly."
        -- RFC 2549


More information about the freebsd-geom mailing list