From owner-freebsd-questions@FreeBSD.ORG Sat Jun 26 23:09:45 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F62016A4CE for ; Sat, 26 Jun 2004 23:09:45 +0000 (GMT) Received: from mta09-svc.ntlworld.com (mta09-svc.ntlworld.com [62.253.162.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA70143D45 for ; Sat, 26 Jun 2004 23:09:44 +0000 (GMT) (envelope-from scott@fishballoon.org) Received: from llama.fishballoon.org ([81.104.195.124]) by mta09-svc.ntlworld.comESMTP <20040626225729.TKWV13031.mta09-svc.ntlworld.com@llama.fishballoon.org>; Sat, 26 Jun 2004 23:57:29 +0100 Received: from tuatara.fishballoon.org ([192.168.1.6]) by llama.fishballoon.org with esmtp (Exim 4.34 (FreeBSD)) id 1BeM6K-0000TA-QZ; Sat, 26 Jun 2004 23:56:48 +0100 Received: (from scott@localhost) by tuatara.fishballoon.org (8.12.11/8.12.11/Submit) id i5QMulZq085141; Sat, 26 Jun 2004 23:56:47 +0100 (BST) (envelope-from scott) Date: Sat, 26 Jun 2004 23:56:47 +0100 From: Scott Mitchell To: hoe-waa@hawaii.rr.com Message-ID: <20040626225647.GA85115@tuatara.fishballoon.org> References: <12122fa12104b3.12104b312122fa@socal.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <12122fa12104b3.12104b312122fa@socal.rr.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 4.10-STABLE i386 cc: freebsd-questions@freebsd.org Subject: Re: changing cards in a reader X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jun 2004 23:09:45 -0000 On Sat, Jun 26, 2004 at 11:39:25AM -1000, hoe-waa@hawaii.rr.com wrote: > Aloha > > Hopefully this is a simple question. FreeBSD does not support my > Olympus C-3000 Zoom camera so I bought a card reader (usb). It has > 4 slots and when I boot or just plug it in I get 4 drives > (da0, da1, da2, & da3). If I have a SmartMedia card installed I > also see da2s1. > > da2s1 mounts fine and I am able to see and use all of the photo files. > > I have additional SM cards and would like to change the installed card at > will. If I do a umount and replace the card and try to mount again I > get an error "mount_msdosfs: /dev/da2s1: Invalid argument". I should > say that the cards are different sizes. In order to mount another card > I have to unplug the usb cable and re-plug it in with the new card in > the slot. > > I have read man camcontrol and do not see an option I can use. > > Is there a way to do this without unplugging and re-plugging the cable? Try this (as root): # camcontrol devlist to find out which CAM device da2 belongs to. On this machine I get: <337 COMB > at scbus1 target 0 lun 0 (pass0,da2) at scbus2 target 0 lun 0 (pass1,da4) at scbus2 target 0 lun 1 (da5,pass2) at scbus2 target 0 lun 2 (da6,pass3) at scbus2 target 0 lun 3 (da7,pass4) My SmartMedia slot happens to be da5, which is device 2:0:1. After unmounting the card, you should be able to: # camcontrol eject 2:0:1 using the appropriate device number for your system, of course. Then swap cards and do: # camcontrol rescan 2:0:1 which should generate some lines in /var/log/messages telling you about the size of the new card. You might want to look into setting up the automounter to do the rescan and eject automatically when cards are mounted and unmounted, respectively. Cheers, Scott -- =========================================================================== Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott at fishballoon.org | 0xAA775B8B | -- Anon