Using netfs

Is it possible to use netfs in haiku now? What need to do for setup netfs?

Any ideas?
Is it possible to share files, attributes and queries by network?

Stippi had this to say when he committed NetFS:

You will want to edit /boot/home/config/settings/kernel/netfs-server before you run netfs_server for the first time (or use netfs_server_prefs on the command line, see below).

To run the server:

$ /system/servers/netfs_server &

To run the client:

$ /system/servers/authentication_server &
$ mkdir /network
$ mount -t userlandfs -p "netfs """ /network

A "Network" icon will appear on your desktop. Remote servers will appear inside the "Network" folder (host name). Inside a folder for a server are the shares of that server. (I.e. what has been defined as share in that respective server's netfs-server driver settings file). netfs_server has actually a new settings file format, you can create settings by using "netfs_server_prefs --help" on the command line. Have fun!

Hope this helps - I haven't tried it yet myself!

1 Like

I am trying to setup netfs trough the netfs_server_prefs command, but it fails to open and create its settings file:

On launch:

netfs_server [101626732744:  5945] NetFSServer::_InitSettings(): WARNING: Failed to load settings file: No such file or directory - falling back to driver settings.

On saving settings:

Failed to save settings, No such file or directory

I tried to create an empty file with

touch /boot/home/config/settings/kernel/netfs-server
and
mkdir -p /boot/home/config/settings/kernel/netfs-server

but none seems to help. strace doesn’t tells me, where the settings file searched. Any idea?

You would need to use strace on the server, apparently, the prefs app doesn’t do much more than messaging.
Otherwise, use the source, Luke! Looking at https://git.haiku-os.org/haiku/tree/src/add-ons/kernel/file_systems/netfs/server/NetFSServer.cpp#n1018, it seems that you have to create the “netfs” directory in the user settings directory, not the kernel settings directory (that seems to be the new settings file format).

I should mention a known and possibly relevant limitation (depending on what you’re doing): the network protocol used by netfs depends on the OS architecture, and so the 32 and 64bit versions won’t talk to each other. Knowing this will save you some head-scratching if that’s what you’re trying to set up.

There is already a bugreport about it but no one investigated it yet.

Thanks but i use exclusively 64 bit on my machines.

Thanks, will check!

After i made the settings folder:
/boot/home/config/settings/netfs
And setting it up with the netfs_server_prefs command, the server side works.

On the client side i had to change the last command to this:

$ mount -t userlandfs -p netfs /network

Now it works very well.

2 Likes

How hard would it be to port netfs to a fuse capable os (like linux)? This would be very useful…