9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: geoff@plan9.bell-labs.com
To: 9fans@9fans.net
Subject: Re: [9fans] Unmount a USB stick?
Date: Thu,  3 Apr 2008 18:28:56 -0400	[thread overview]
Message-ID: <73e155073a3b3f0412c336ad8b41017e@plan9.bell-labs.com> (raw)
In-Reply-To: <01044970cb30fd41a02e19818ead294e@coraid.com>

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

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.

[-- Attachment #2: Type: message/rfc822, Size: 2477 bytes --]

From: erik quanstrom <quanstro@coraid.com>
To: 9fans@9fans.net
Subject: Re: [9fans] Unmount a USB stick?
Date: Thu, 3 Apr 2008 18:17:42 -0400
Message-ID: <01044970cb30fd41a02e19818ead294e@coraid.com>

>
> % 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

  reply	other threads:[~2008-04-03 22:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-03 22:11 devrin talen
2008-04-03 22:17 ` erik quanstrom
2008-04-03 22:28   ` geoff [this message]
2008-04-03 22:48     ` erik quanstrom
2008-04-03 23:58     ` devrin talen
2008-04-04  0:41       ` erik quanstrom
2008-04-04  0:56         ` devrin talen
2008-04-03 22:19 ` a
2008-04-04 10:42 ` Richard Miller
2008-04-04 13:23 Richard Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=73e155073a3b3f0412c336ad8b41017e@plan9.bell-labs.com \
    --to=geoff@plan9.bell-labs.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).