Date: Tue, 21 Dec 2010 12:26:24 +0100 (CET) From: Oliver Fromme <olli@lurza.secnetix.de> To: freebsd-geom@FreeBSD.ORG, lev@serebryakov.spb.ru Subject: Re: FreeBSD 8.2-PRERELASE doesn't see slice on SDHC card in ?cardreader ?-- what should I do? Message-ID: <201012211126.oBLBQOT9090842@lurza.secnetix.de> In-Reply-To: <1279680207.20101221121235@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Lev Serebryakov <lev@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. > 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.). In other words, the problem is on a different level. > (I don't mention auto-sensing ;-))? Is it problem with my > cardreader or common problem for FreeBSD? As Andriy wrote, it's kind of both. 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). So, FreeBSD does not know when a new card is inserted, so the GEOM system does not know when to re-read the slice table from the device. However, there is a notification for USB devices. So, if your card reader is an external USB device, you can remove it and then plug it back (with the SD card already inserted!). The USB notification mechanism will tell GEOM that there is a new device, and GEOM will read it and find the slices. Of course, this is not possible if the card reader is built-in (e.g. in a notebook), so you have to use the work-around by opening the device for writing. It's not trivial to fix the problem in a clean way. 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 "I invented Ctrl-Alt-Delete, but Bill Gates made it famous." -- David Bradley, original IBM PC design team
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012211126.oBLBQOT9090842>