Thanks! I checked out rumpctrl and followed examples there. It seems
straightforward.
I got some errors when trying to create the virt0 interface. This is a
pretty recent checkout. Not sure if you could see anything obvious...
$ export RUMP_SERVER=unix:///tmp/rump
$ rump_allserver unix:///tmp/rump
$ cd rumpctrl/bin
$ ./ls
dev tmp
$ ./ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33648
inet 127.0.0.1 netmask 0xff000000
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
$ ./ifconfig virt0 create
./ifconfig: clone_command: Invalid argument ===> error message I got
./ifconfig: exec_matches: Invalid argument ===> error message I
got
$ ./modstat
...
if_virt_virt driver builtin 0 0 - -
nfs vfs builtin 1 0 - -
nfsserver misc builtin 0 0 - nfs
...
Regards,
Liming
On Fri, May 22, 2015 at 12:42 PM, Antti Kantee <[email protected]> wrote:
> On 22/05/15 13:26, Liming Sun wrote:
>
>> Hi, I have some basic question about how to integrate some new library or
>> tool, such as NFS.
>> Is there any guidance or example about the steps in general? I did some
>> search but couldn't find any easy steps.
>>
>
> Good question, though it's not possible to give a generic answer. I'll
> explain and you can refine the question if necessary. If you include more
> specific knowledge of what you want integrated and where, the answer can be
> better.
>
> Now, NFS, specifically, is made up a kernel part and a userspace part. The
> kernel part is the file system driver itself, and the userspace part is
> mount_nfs(8), which handles the initial RPC dance for getting the file
> handle used to mount NFS. The kernel part is easy. It's already shipped
> by everything that uses buildrump.sh. Generally speaking, all kernelside
> functionality is best integrated by submitting it to the upstream anykernel
> (currently always NetBSD), and then we get it in rump kernel projects for
> free without having to do anything except checkout new enough upstream
> anykernel sources. If the kernel code can't for some reason go into
> upstream, some other place needs to be figured out. One such example is
> buildrump.sh/brlib.
>
> The userspace part, i.e. mount_nfs(8), is a bit different from the kernel
> part, because you need a userspace environment to compile/run it. That's
> not available except for rumprun and rumpctrl, so if you want to support
> NFS in some other environment, you more or less have to rely on your own
> creativity. For rumpctrl mount_nfs can be supported easily. For rumprun
> it's a bit trickier, since we haven't yet figured out how to include
> multiple configuration programs in a single unikernel image. That said,
> we'll get there eventually.
>
> - antti
>
>