Subject: Re: Portal file system...
To: None <>
From: Brian C. Grayson <>
List: current-users
Date: 09/30/1999 19:21:46
On Wed, Sep 29, 1999 at 01:51:35AM +0200, Feico Dillema wrote:
> Now, I'm desparate for a (short-time)
> solution and was wondering whether I could get rid of these NFS mounts
> by use the portal file system instead. The NFS-mounts in question
> mount anonymous ftp-dirs from one server (ipv4-only) to the ftp
> dir of another (dualstack). I understand I should be able to replace
> this with a portal mount.

  A portal mount will never allow you to do 'ls' on its
subdirectories.  If you always know the exact paths, then this
isn't a problem.  If you want to be able to do 'ls', but don't
care about the size being wrong, then read the next paragraphs.
(Think of it as having a directory with 'r' turned off, but 'x'
turned on -- you can look at files if you know the name, but
you can't do an ls.)

  There are several ways of doing what you want using the
new rfilter stuff added to the portal filesystem, some of which
assume the ftp dirs change very rarely.  From your description,
it sounds like you are trying to use dualstack as an ftp 'mirror'.

  If the file structure doesn't change much, you can set up
anonymous ftp on ipv4, and create a tree of symlinks on
dualstack that point ~ftp/pub/xxx/yyy to
/p/ftp/ipv4/pub/xxx/yyy.  If someone now tries to download
dualstack:/pub/xxx/yyy, ftpd on dualstack will follow the
symlink and open and read /p/ftp/ipv4/pub/xxx/yyy, which will
be one end of a socket, the other end of which is an ftp client
created by mount_portal that will connect to ipv4 and fetch and
cat file /pub/xxx/yyy into the socket.  Thus, from dualstack's
point of view, it got the data.  It just took a few processes
and an ftp connection to do it!

  Note that you'll have to add the proper translation for
/p/ftp in your /etc/portal.conf and set up the mount.  Look at
the examples in /usr/share/examples/mount_portal for hints.

  Note that with a bit of ingenuity, one could use mount_portal
to create a mirror site that only mirrors what is fetched,
i.e., it fetches on demand, but keeps a local copy only of what
has been requested, and not everything.  There's no limit to
the convoluted things that are possible!

  Hope this helps.  It might be easier (but less cool) to just
fix the NFS problem.  :)