Gfarm client

From PRAGMA wiki
Jump to: navigation, search

Install prerequisites

  1. Follow installation guide in Gfarm file server to install gfarm software
  2. Check for fuse; if not present install
    # yum --enablerepo base list fuse
    # yum --enablerepo base install fuse
    NOTE: check permissions on installed /bin/fusermount
    # ls -l /bin/fusermount
    -rwsr-x--- 1 root fuse 32336 Dec 7 2011 /bin/fusermount
    Update permissions so that all users can execute fusermount command:
    # chmod a+rx /bin/fusermount
    # ls -l /bin/fusermount
    -rwsr-xr-x 1 root fuse 32336 Dec 7 2011 /bin/fusermount

Install gfarm2fs

  1. Download and install latest gfarm2fs distribution (use your installation path for gfarm and gfarm2fs):
    # wget http://sourceforge.net/projects/gfarm/files/gfarm2fs/1.2.9.1/gfarm2fs-1.2.9.1.tar.gz
    # tar xzvf gfarm2fs-1.2.9.1.tar.gz
    # cd gfarm2fs-1.2.9.1
    # ./configure --with-gfarm=/opt/gfarm-2.5.8.1 --prefix=/opt/gfarm-2.5.8.1
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    ...
    checking sys/acl.h presence... no
    checking for sys/acl.h... no
    configure: error: sys/acl.h not found. specify --disable-acl
    NOTE: If you get an error about missing sys/acl.h as above, reconfigure with specified additional flag:
    ./configure --with-gfarm=/opt/gfarm-2.5.8.1 --prefix=/opt/gfarm-2.5.8.1 --disable-acl
    make
    make install

Configure Gfarm client node

  1. Open Firewall for gfarm ports (TCP and UDP port 600 and TCP port 601)
    # rocks list host firewall
    # rocks add firewall global=global action=ACCEPT chain=INPUT protocol=udp service=600 network=all rulename=A100-GFARM-UDP-600
    # rocks add firewall global=global action=ACCEPT chain=INPUT protocol=tcp service=600 network=all rulename=A100-GFARM-TCP-600
    # rocks add firewall global=global action=ACCEPT chain=INPUT protocol=tcp service=601 network=all rulename=A100-GFARM-TCP-601
    # rocks sync host firewall
    # service iptables restart
  2. If you install gfarm2fs in the same location as gfarm, no additional action is needed. If your installation path differs then add the location of binary to your PATH in your environment profile file:
    # vi /etc/profile.d/gfarm.sh
    and change the line in it to reflect gfarm2fs location:
    export PATH="/opt/gfarm/bin:/opt/gfarm2fs/bin:$PATH"
    Source the file to make changes available immediately
    # . /etc/profile.d/gfarm.sh

Testing

Make sure that Gfarm meta-server admin has registered you as a Gfarm user. The steps below are using gsi authentication to access gfarm. The steps are executed on your host from your user account

  1. Create a certificate proxy
    $ grid-proxy-init
  2. List contents of gfarm directory
    $ gfls -la
    drwxrwxr-x 4 gfarmadm gfarmadm 4 Jun 12 10:57 .
    drwxrwxr-x 4 gfarmadm gfarmadm 4 Jun 12 10:57 ..
    drwxr-xr-x 6 zhengc gfarmadm 0 Jun 12 14:24 home
    drwxr-xr-x 3 zhengc gfarmadm 0 Jun 12 10:59 wwwo
  3. Mount gfarm system
    $ mkdir gfarm-local-copy
    $ gfarm2fs gfarm-local-copy
    $ ls -l gfarm-local-copy/
    total 0
    drwxr-xr-x 18 zhengc 70000 0 Jul 12 11:41 home
    drwxr-xr-x 5 zhengc 70000 0 Feb 19 12:50 vm-images
    NOTE: your output will be different depending on the contents of the gfarm system
  4. Unmount the filesystem
    $ fusermount -u gfarm-local-copy

You can try more Gfarm commands.