Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Dec 1999 11:08:23 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        "Alexey N. Dokuchaev" <danfe@inet.ssc.nsu.ru>
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: mx0??
Message-ID:  <199912081608.LAA19710@server.baldwin.cx>
In-Reply-To: <Pine.LNX.4.04.9912082122410.29330-100000@inet.ssc.nsu.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

On 08-Dec-99 Alexey N. Dokuchaev wrote:
> 
> Hello!
> 
> Thanx for reponse.  However....
> 
>> 
>> portalfs works, but I've no experienec with it.  umapfs doen't work at the
>> moment because it needs stacking layers to work.
>> 
> 
> Well, I actually asked to explain them to me, not about whether they work
> or not :-)

Ahh, ok.  portalfs allows you to access network connections via the filesystem.
IOW, you would be able to get a socket to a remote machine's web server by
opening the file <portalfs_mount>/<hostname>/80/.

umapfs is used to remap UID's.  It sits on top of another filesystem and simply
adds a remapping layer.  Thus, you could have all the files owned by joe appear
to be owned by user bob in the umapfs mount.

nullfs just passes all requests through to the lower layer.  It can be used to
remount a filesystem in a loopback underneath its original mountpoint.

mount_portal(8), mount_null(8), and mount_umap(8) have more information in them

>> > 1) I thought that these babies will allow me to have approx the same as
>> > /proc under linux, since PROCFS in FBSD yields me _pathetic_ stuff.
>> > However, I get /proc/fd dir, with filedescrs (apparently), but there's no
>> > FDESC option enabled in GENERIC kernel.  Ideas?
>> 
>> /proc is very adequate in doing what its job is:  displaying information
>> specific to individual processes and not system-wide kernel specific stuff. 
>> The system-wide stuff goes in KERNFS.  Also, I believe that in the Linux
>> 2.3.x
>> kernel, /proc has been cleaned up with many parts moved over to /kern where
>> they belong. :)
>> 
> 
> OK.  So why only PROCFS is mounted by default?

Because most things that want kernel statistics use libkvm or sysctl instead of
kernfs.

>> > 2) KERNFS.  Is it behaviour the same as of procfs?  Meaning, I have
>> > to have a /proc (/kern) and apporpriate line in /etc/fstab, and I cannot
>> > mount it after boot?  (are my last 3 questions correct?)
>> 
>> You can mount it fine after boot, in fact, you can umount and mount procfs
>> as
>> well, there's just no good reason to be doing so.  Here's my line from
>> /etc/fstab:
>> 
>> kern                    /kern           kernfs  rw              0       0
>> 
> 
> I've got the same ;-)
> 
> And you know what's cool.  I can mount/umount /proc many times!  Why
> shouldn't that be checked?  Same with /kern....

Why does it matter whether they or mounted or how many times they are mounted? 
They aren't used to run the system, they merely provide statistical data.  They
are not required fs's in FreeBSD.  The only required fs is /.

>> As far as fdescfs, it is already "mounted" for you at /dev/fd.  If you want,
>> you can mount it somewhere else as well.  AFAIK, it works fine.
> 
> Hmm, I know it's alreay mounted.  But where is corresponfing line in
> fstab?

That's why I used quotes around mounted.  There's some black magic there that
I'm not sure about.  According to fdesc(5), it's union mounted on top of /dev,
but I think it's more tricky than that.  Both the underlying /dev and fdescfs
need to write to different parts of /dev, so I'm guessing a straight union
mount wouldn't work.

> Cheers,
> 
> ./danfe

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912081608.LAA19710>