9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Unmount of /mnt directory
Date: Wed, 24 Jun 2009 07:41:42 -0400	[thread overview]
Message-ID: <ec141718913bbac01b1436b2131af4b3@quanstro.net> (raw)
In-Reply-To: <2c7a0fb7-0aba-4337-8120-60cfc1192a5c@x5g2000yqk.googlegroups.com>

> it seems I still do not fully understand namespaces.
> But this sequence seems strange to me:
>
> cdfs -d /dev/sdD0
> unmount /mnt/cd
>
> ...everything is OK.
>
> cdfs -d /dev/sdD0
> unmount /mnt
>
> ...I unmounted wrong directory...
>
> cdfs -d /dev/sdD0
> cdfs: openscsi '/dev/sdD0': '/dev/sdD0/raw' device or object already
> in use
>
> ...this situation is persistent.
>
> What happened in the system when I unmounted /mnt directory?

on my system /mnt is constructed like this

	chula# ns | grep '/mnt $'
	bind -c /root/mnt /mnt
	mount -a '#s/factotum' /mnt

if i unmount /mnt i get

	chula# unmount /mnt
	chula#  '/mnt $'

it might be surprising that, e.g.,
	mount -c '#D/ssl/2/data' /mnt/term
is not unmounted, but the mntpt isn't /mnt,
it's /mnt/term.  things below /mnt are not
accessable because we must walk from the
root.

with this knowledge, one can reconstruct
the former namespace and unmount /mnt/cd.

	chula# bind -c /root/mnt /mnt
	chula# mount -a '#s/factotum' /mnt
	chula# unmount /mnt/cd

alternatevely, "slay cdfs | rc" would work,
if you didn't care about that ns being screwy.

- erik



  reply	other threads:[~2009-06-24 11:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-24  9:02 Pavel Klinkovsky
2009-06-24 11:41 ` erik quanstrom [this message]
2009-06-24 13:06 ` Pavel Klinkovsky

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=ec141718913bbac01b1436b2131af4b3@quanstro.net \
    --to=quanstro@quanstro.net \
    --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).