Grid Datafarm: GfarmFS-FUSE + NFS [English]

documents > User's Manual > nfs/gfarmfs-fuse

# GfarmFS-FUSE + NFS

English | Japanese

## 1. Overview

This document describes how to export Gfarm file system via NFS. The exported Gfarm file system is assumed to be mounted by GfarmFS-FUSE.

### 1.1 Preparation for NFS server

- GfarmFS-FUSE
- see README.NFS of FUSE

Note that 'write_local_priority disable' should be set in gfarm.conf when NFS server is a file system node.

### 1.2 Reference

- Gfarm and Gfarm2fs: http://oss-tsukuba.org/en/software/gfarm
- FUSE: http://fuse.sourceforge.net/

## 2. Export NFS file system

### 2.1 Mount Gfarm file system by GfarmFS-FUSE

Before exporting a Gfarm file system via NFS, it is necessary to mount Gfarm file system by GfarmFS-FUSE in user mode.

      $ gfarmfs [gfarmfs options] mount-point -o allow_root [FUSE options]

When `-o allow_root` is disallowed, it is necessary to allow it by adding

    user_allow_other

in `/etc/fuse.conf`. For details, refer to a document of GfarmFS-FUSE, Gfarm, and FUSE. The following example assumes /tmp/yourname/gfarmfs is a mount point.

Note that you should not specify the `-o allow_other` option. In this case, every user can access Gfarm file system under your privilege.

### 2.2 NFS server setting

To export a GfarmFS-FUSE mounted directory, please see README.NFS of FUSE.
It is necessary to add `fsid` and `anonuid` in `/etc/exports`. Here is an example of `/etc/exports`.

    /tmp/yourname/gfarmfs  AAA.BBB.CCC.0/255.255.255.0(rw,fsid=10,anonuid=1205)

You can specify any unused number for `fsid`. For `anonuid`, you need to specify a uid that mounts Gfarm file system using GfarmFS-FUSE. After that, it is necessary to restart the nfs server.

      # service nfs restart

## 3. Mount Gfarm file system from NFS client

You can mount Gfarm file system from NFS clients as usual. There is no special setting required. Here is an example of `/etc/fstab`.

    AAA.BBB.CCC.1:/tmp/yourname/gfarmfs  /mnt/gfarm/yourname  nfs  rw,sync,noauto  0  0

## 4. Caveat

- Gfarm file system, which will be exported via NFS, needs to be mounted by GfarmFS-FUSE in *user mode*. After mounting Gfarm file system by GfarmFS-FUSE, restarting NFS server is required.
- Gfarm file system exported via NFS can be accessed only by a user who mounts Gfarm file system.

## 5. Comment

If you have any question or comment, feel free to send email to gfarmfs at gmail.com.