9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: cigar562hfsp952fans@icebubble.org
To: 9fans <9fans@9fans.net>
Subject: [9fans] Re: Mounting a 9P filesystem under a Linux "user namespace"
Date: Mon, 30 Oct 2023 04:39:34 +0000	[thread overview]
Message-ID: <8634xsbu61.fsf@cmarib.ramside> (raw)
In-Reply-To: <87jzr8rqwh.fsf@rdklein.fr>

Edouard Klein <edou@rdklein.fr> writes:

> I'm about to write my own 9P2000.L fuse wrapper, but before I dive into
> that, I thought I'd ask here: has anybody ever mounted a 9P filesystem
> from inside a Linux user namespace, or even better, a full blown
> container ?

Well, all my containers are in the recycling bin by my back door.  But I
do regularly mount and use 9P filesystems on Linux, using either the
"9p" filesystem in the Linux kernel or the 9pfuse FUSE client, depending
on the circumstances.

I modified 9pfuse to support Unix file types (block/character devices,
symlinks, etc.)  Those modifications allow storage/retrieval of vac
archives containing Unix filesystems.  IIRC, I submitted those changes
as a patch to plan9port about 10 years ago.

There are problems with 9pfuse, however.  9pfuse is slow and leaks
memory.  And, due to restrictions in the FUSE protocol, file ownership
is limited to a single user (the user mounting the export).  GNU find
(even with invoked with -noleaf) also has problems traversing
directories served by 9pfuse.  I haven't bothered porting my mods to
9pfs, though it may well be worth the effort.

I've been toying with the idea of writing a 9P2000 translation server to
translate between my extensions and 9p2000.u.  That way, a single 9P2000
filesystem could be mounted (presumably by root) and used by multiple
users.  The problem with the Linux kernel's 9p filesystem is that it
doesn't have any sensible way to map 9P2000 user/group names to Linux
UID/GIDs.  That seems to be the big stumbling block.

Wait, 9P2000.L?  What's that?

Inferno's "export" works OK with both 9pfuse and Linux's 9p fs driver.
But I recall there being other 9P2000 file servers out there.

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Tb5d039f675c54046-Md105fe9cdb66627c43229d81
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

      parent reply	other threads:[~2023-10-30 19:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 16:00 [9fans] " Edouard Klein
2023-10-27 16:34 ` [9fans] " moody
2023-10-28 15:05   ` Edouard Klein
2023-10-28 16:52     ` Edouard Klein
2024-02-23 21:08       ` Edouard Klein
2023-10-30  4:39 ` cigar562hfsp952fans [this message]

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=8634xsbu61.fsf@cmarib.ramside \
    --to=cigar562hfsp952fans@icebubble.org \
    --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).