From owner-freebsd-geom@FreeBSD.ORG Tue Dec 21 11:26:42 2010 Return-Path: Delivered-To: freebsd-geom@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 020ED106566B for ; Tue, 21 Dec 2010 11:26:42 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [IPv6:2a01:170:102f::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5E90F8FC12 for ; Tue, 21 Dec 2010 11:26:41 +0000 (UTC) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.3/8.14.3) with ESMTP id oBLBQOFq090843; Tue, 21 Dec 2010 12:26:40 +0100 (CET) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.3/8.14.3/Submit) id oBLBQOT9090842; Tue, 21 Dec 2010 12:26:24 +0100 (CET) (envelope-from olli) Date: Tue, 21 Dec 2010 12:26:24 +0100 (CET) Message-Id: <201012211126.oBLBQOT9090842@lurza.secnetix.de> From: Oliver Fromme To: freebsd-geom@FreeBSD.ORG, lev@serebryakov.spb.ru In-Reply-To: <1279680207.20101221121235@serebryakov.spb.ru> X-Newsgroups: list.freebsd-geom User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.4-PRERELEASE-20080904 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.5 (lurza.secnetix.de [127.0.0.1]); Tue, 21 Dec 2010 12:26:40 +0100 (CET) Cc: Subject: Re: FreeBSD 8.2-PRERELASE doesn't see slice on SDHC card in ?cardreader ?-- what should I do? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-geom@FreeBSD.ORG, lev@serebryakov.spb.ru List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Dec 2010 11:26:42 -0000 Lev Serebryakov 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