Skip to content
Philippe DENIEL edited this page Oct 30, 2012 · 2 revisions

Table of Contents

Using 9P as a filesystem protocol in Ganesha

Ganesha 1.4.1 has support for the 9p.2000L protocol. This feature works whatever the FSAL (and the related filesystem backend) you use.

In this page, we will consider that FSAL_VFS is the one that you chose.

Compiling with 9P support

You just need to add --enable-9p to the ./configure's options. For example (using FSAL_VFS);

  # ./configure --with-fsal=VFS --enable-9p
  # make
  # make install

Configuring the Ganesha daemon

For the moment, you can set the port used by the daemon to listen for 9P message (default is 564 aka 9pfs in /etc/services), the log destination and the log level for 9P related log information.

In you ganesha's configuration file, if you want to change these parameters, you may use that syntax:

  _9P 
  {
     _9P_Port = 564 ;
     DebugLevel = NIV_FULL_DEBUG ;
     # LogFile
     #

  }

Tuning the client to use Ganesha as a 9P server

You need a recent client (I had issue with 2.6.x kernels, but never had troubles with 3.x kernels). Make sure you have these options set in you .config when you configure your kernels

  CONFIG_NET_9P=m
  # CONFIG_NET_9P_VIRTIO is not set
  # CONFIG_NET_9P_RDMA is not set
  # CONFIG_NET_9P_DEBUG is not set
  CONFIG_9P_FS=m

Mounting via 9P

For the moment, Linux has no mount helper for 9P. This make the mount command line being quite complex. Imaginer you run the server on host whose IP addr is 192.168.10.2 and wants to export /home (you have set up such an entry in Ganesha's configuration file). Your local mount point is /mnt The client should then do this:

  # mount -t 9p 192.168.10.2 /mnt -ouname=root,aname=/home,msize=65560,version=9p2000.L,debug=0x0,user=access

You may set up an entry in /etc/fstab to make things easier

  # grep 9p /etc/fstab
  192.168.10.2       /mnt    9p      uname=root,aname=/tmp,msize=65560,version=9p2000.L,debug=0x0,user=access 0 0 

Future feature

Implementation of extended attributes (aka xattr) via 9P will be made soon. Support of RDMA as a transport layer is coming too.

Using 9P as a filesystem protocol in Ganesha

Ganesha 1.4.1 has support for the 9p.2000L protocol. This feature works whatever the FSAL (and the related filesystem backend) you use.

In this page, we will consider that FSAL_VFS is the one that you chose.

Compiling with 9P support

You just need to add --enable-9p to the ./configure's options. For example (using FSAL_VFS);

  # ./configure --with-fsal=VFS --enable-9p
  # make
  # make install

Configuring the Ganesha daemon

For the moment, you can set the port used by the daemon to listen for 9P message (default is 564 aka 9pfs in /etc/services), the log destination and the log level for 9P related log information.

In you ganesha's configuration file, if you want to change these parameters, you may use that syntax:

  _9P 
  {
     _9P_Port = 564 ;
     DebugLevel = NIV_FULL_DEBUG ;
     # LogFile
     #

  }

Tuning the client to use Ganesha as a 9P server

You need a recent client (I had issue with 2.6.x kernels, but never had troubles with 3.x kernels). Make sure you have these options set in you .config when you configure your kernels

  CONFIG_NET_9P=m
  # CONFIG_NET_9P_VIRTIO is not set
  # CONFIG_NET_9P_RDMA is not set
  # CONFIG_NET_9P_DEBUG is not set
  CONFIG_9P_FS=m

Mounting via 9P

For the moment, Linux has no mount helper for 9P. This make the mount command line being quite complex. Imaginer you run the server on host whose IP addr is 192.168.10.2 and wants to export /home (you have set up such an entry in Ganesha's configuration file). Your local mount point is /mnt The client should then do this:

  # mount -t 9p 192.168.10.2 /mnt -ouname=root,aname=/home,msize=65560,version=9p2000.L,debug=0x0,user=access

You may set up an entry in /etc/fstab to make things easier

  # grep 9p /etc/fstab
  192.168.10.2       /mnt    9p      uname=root,aname=/home,msize=65560,version=9p2000.L,debug=0x0,user=access 0 0 

Future feature

Implementation of extended attributes (aka xattr) via 9P will be made soon. Support of RDMA as a transport layer is coming too.