From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <73e155073a3b3f0412c336ad8b41017e@plan9.bell-labs.com> To: 9fans@9fans.net Date: Thu, 3 Apr 2008 18:28:56 -0400 From: geoff@plan9.bell-labs.com In-Reply-To: <01044970cb30fd41a02e19818ead294e@coraid.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-jjgognplnbjoifzhuxxwvxjzwh" Subject: Re: [9fans] Unmount a USB stick? Topicbox-Message-UUID: 8822ed22-ead3-11e9-9d60-3106f5b1d025 This is a multi-part message in MIME format. --upas-jjgognplnbjoifzhuxxwvxjzwh Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I believe dossrv (which implements the fat filesystem) is synchronous, so you shouldn't have to do anything special before removing the stick. What are the errors you get the next time you try to mount the stick? > you have to restart usbd. usbd doesn't handle device ejection as > far as i can tell. I'm pretty sure that it's more nuanced than that. I've been able to eject and re-insert usb devices on uhci interfaces. I think the problems with usbd not noticing device additions and removals is limited to ohci interfaces, and I'm not sure why yet. --upas-jjgognplnbjoifzhuxxwvxjzwh Content-Type: message/rfc822 Content-Disposition: inline Received: from gouda.swtch.com ([67.207.142.3]) by plan9; Thu Apr 3 18:18:55 EDT 2008 Received: from localhost ([127.0.0.1] helo=gouda.swtch.com) by gouda.swtch.com with esmtp (Exim 4.67) (envelope-from <9fans-bounces@9fans.net>) id 1JhXkx-0005VT-F1; Thu, 03 Apr 2008 22:18:03 +0000 Received: from baron.coraid.com ([12.51.113.4] helo=coraid.com ident=none) by gouda.swtch.com with esmtp (Exim 4.67) (envelope-from ) id 1JhXkv-0005VI-1q for 9fans@9fans.net; Thu, 03 Apr 2008 22:18:01 +0000 Message-ID: <01044970cb30fd41a02e19818ead294e@coraid.com> From: erik quanstrom Date: Thu, 3 Apr 2008 18:17:42 -0400 To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Unmount a USB stick? X-BeenThere: 9fans@9fans.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.9fans.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: 9fans-bounces@9fans.net Errors-To: 9fans-bounces+9fans-local=plan9.bell-labs.com@9fans.net > > % unmount /n/usb > % unmount /n/disk > > But have no idea if that's the right way to go about it. Additionally > if I eject it in this manner the next time I try to mount it using the > first two commands I get a bunch of usb errors. you have to restart usbd. usbd doesn't handle device ejection as far as i can tell. > Also, why is the disk only available from the rc window that I used to > mount it? In any other rc window I can't access the /n/usb mountpoint. > I realize I'm probably missing something fundamental about plan 9 > (newbie here). this is because rio puts each window in a sepeate namespace. there are two ways around this. first, start this before you start rio. (alternatively use the plumber to give all new windows access. plumb a string like Local 'cmd for everyone to see' ) alternatively, you can use /srv to post the fd. - erik --upas-jjgognplnbjoifzhuxxwvxjzwh--