re: 9pfuse on Linux

285 views
Skip to first unread message

Alexander Kapshuk

unread,
Sep 26, 2012, 2:17:35 PM9/26/12
to plan9p...@googlegroups.com
Hello,

After watching the acme video Russ put out, I thought I'd give 9pfuse a
try on my Linux system.

So far my setting it up has been 50/50. Some help would be appreciated.

Here's what I've done so far.

(1). I've created a mount point for acme:
=; ls -ld /mnt/acme/
drwxrwxr-x 2 root fuse 4096 Sep 24 20:57 /mnt/acme/
(2). I've added my $USER name to the fuse group.
(3). I've modified the mount point directory ownership so that it was
owned and writable by the fuse group.
(4). I've put this line in my /home/$USER/.profile:
9pfuse unix!/tmp/ns.$USER.:0/acme /mnt/acme
(5). When I click button 3 on /mnt/acme, acme freezes with the 9pfuse
process going into the Sleep state.

My system details are:
=; uname -a
Linux localhost 2.6.32-5-686 #1 SMP Sun May 6 04:01:19 UTC 2012 i686
GNU/Linux

What am I doing wrong?

Thanks.

Alexander Kapshuk.

Russ Cox

unread,
Sep 26, 2012, 2:19:50 PM9/26/12
to alexande...@gmail.com, plan9p...@googlegroups.com
You're not doing anything wrong, unfortunately. On Plan 9 acme does
not mount itself into its own name space. On Unix of course there is
just one name space so that cannot be avoided. But trying to make acme
read its own files directly is a recipe for deadlock. It blocks
waiting on the file I/O that it needs to be unblocked to serve. If you
want to poke around in /mnt/acme using acme the way to do it is to run
a shell inside a win session. I am sorry about this particular wart. I
haven't looked into how hard it would be to remove.

Russ

Alexander Kapshuk

unread,
Sep 26, 2012, 2:43:06 PM9/26/12
to Russ Cox, plan9p...@googlegroups.com
Thanks a lot for a prompt reply.
Now that you mention it, I do recall you accessing your /mnt/acme via a
shell session running within a win session.

Two other things I wanted to ask was:
(1). The line below doesn't seem to be executed when
/home/$USER/.profile is read:
9pfuse unix!/tmp/ns.$USER.:0/acme /mnt/acme
Can't figure out why not. When I run it manually from within .profile
that I have open in acme, I am able to see 9pfuse as a running process.
(2). Executing 'ls' from withing a shell running inside a win session on
/mnt/acme, opens up a few extra windows as well, which is something I
don't remember seeing in your acme video.

Thanks.

Alexander.

Russ Cox

unread,
Sep 26, 2012, 3:53:10 PM9/26/12
to Alexander Kapshuk, plan9p...@googlegroups.com
On Wed, Sep 26, 2012 at 2:43 PM, Alexander Kapshuk
<alexande...@gmail.com> wrote:
> Two other things I wanted to ask was:
> (1). The line below doesn't seem to be executed when /home/$USER/.profile is
> read:
> 9pfuse unix!/tmp/ns.$USER.:0/acme /mnt/acme
> Can't figure out why not. When I run it manually from within .profile that I
> have open in acme, I am able to see 9pfuse as a running process.

Maybe you need to quote the address for bash since it contains a !.
I doubt it, but maybe. Perhaps it is failing because acme has not yet started
serving the name space when 9pfuse runs?

> (2). Executing 'ls' from withing a shell running inside a win session on
> /mnt/acme, opens up a few extra windows as well, which is something I don't
> remember seeing in your acme video.

Yes. On Plan 9, each time you cd into /mnt/acme/new you find yourself
in the directory of a new window. On Unix with FUSE, opening the
directory does this. (This is another slight incompatibility between
9P and Unix/FUSE.) I think the native ls does open the directory for
some reason, although I don't know why. In the video I was using 'lc
-F', which does not open the directory and also makes columns using
the acme font information.

Russ
Reply all
Reply to author
Forward
0 new messages