简介:数据网格系统Gfarm是日本AIST研制的一个数据网格中间件。它是一个面向数据密集型网格应用程序的全局文件系统,支持对文件的并行I/O 操作。在网格环境中,Gfarm 采用GSI[8 ] 认证方式,它不接受多级受限的代理证书。下面我把我实验的经历写出来,大家将来如果有兴趣研究可以参考一下,如果有什么地方有不对之处可以提出来大家一起探讨一下,互相学习。
一、安装:
gfarm metadata server的安装:
rpm -Uvh globus-gpt-4.0.2-1.i386.rpm
rpm -Uvh globus-gssapi-gsi-libs-gcc32-4.0.2-1.i386.rpm
rpm -Uvh gfarm-gsi-libs-1.4.1-0.i386.rpm
rpm -Uvh gfarm-gsi-server-1.4.1-0.i386.rpm
rpm -Uhv gfarm-gsi-client-1.4.1-0.i386.rpm(可装可不装,不装的话gfkey –c只能在别的机器上运行获取密钥)
gfarm metadata cache server的安装:
rpm -Uvh globus-gpt-4.0.2-1.i386.rpm
rpm -Uvh globus-gssapi-gsi-libs-gcc32-4.0.2-1.i386.rpm
rpm -Uvh gfarm-gsi-libs-1.4.1-0.i386.rpm
rpm -Uvh gfarm-gsi-agent-1.4.1-0.i386.rpm
rpm -Uhv gfarm-gsi-client-1.4.1-0.i386.rpm
gfarm file system node 的安装:
rpm -Uvh globus-gpt-4.0.2-1.i386.rpm
rpm -Uvh globus-gssapi-gsi-libs-gcc32-4.0.2-1.i386.rpm
rpm -Uvh globus-proxy-utils-gcc32-4.0.2-0.i386.rpm
rpm -Uvh gfarm-gsi-libs-1.4.1-0.i386.rpm
rpm -Uvh gfarm-gsi-doc-1.4.1-0.i386.rpm
rpm -Uvh gfarm-gsi-client-1.4.1-0.i386.rpm
rpm -Uvh gfarm-gsi-fsnode-1.4.1-0.i386.rpm
rpm -Uvh glibc-not-hidden-2.3.4-2.25.i686.rpm
rpm -Uvh gfarm-gsi-gfront-1.4.1-0.i386.rpm
rpm -Uvh gfarm-gsi-gfptool-1.4.1-0.i386.rpm
gfarm client 的安装:
rpm -Uvh globus-gpt-4.0.2-1.i386.rpm
rpm -Uvh globus-gssapi-gsi-libs-gcc32-4.0.2-1.i386.rpm
rpm -Uvh globus-proxy-utils-gcc32-4.0.2-0.i386.rpm
rpm -Uvh gfarm-gsi-libs-1.4.1-0.i386.rpm
rpm -Uvh gfarm-gsi-doc-1.4.1-0.i386.rpm
rpm -Uvh gfarm-gsi-client-1.4.1-0.i386.rpm
rpm -Uvh glibc-not-hidden-2.3.4-2.25.i686.rpm
二、配置
gfarm metadata server的配置:
# gfkey -c
# scp /root/.gfarm_shared_key cache:/root/
# scp /root/.gfarm_shared_key systemnode:/root/
# scp /root/.gfarm_shared_key client:/root/
# config-gfarm
# chown -R postgres:postgres /var/gfarm-pgsql
# chmod 700 /var/gfarm-pgsql
# su – postgres
$ initdb -D /var/gfarm-pgsql
$ pg_ctl -D /var/gfarm-pgsql -l logfile2 restart
gfarm metadata cache server的配置:
#scp metadata:/etc/gfarm.conf /etc/
# config-agent
gfarm file system node 的配置:
#scp cache:/etc/gfarm.conf /etc/
#config-gfsd
#chmod 1777 /var/gfarm-spool
gfarm client 的配置:
#scp metadata:/etc/gfarm.conf /etc/
#gfmkdir gfarm:~
#vi .bashrc 添加如下:
LD_PRELOAD='/usr/local/gfarm/lib/libgfs_hook.so.0 /usr/lib/gfarm/librt-not-hidden.so /usr/lib/gfarm/libpthread-not-hidden.so /usr/lib/gfarm/libc-not-hidden.so'
export LD_PRELOAD
#su -
#gfls -la 显示如下:
drwxr-xr-x root * 0 Dec 3 18:18 .
drwxrwxrwx root gfarm 0 Jan 1 1970 ..
#gfhost -M 显示如下:
i386-redhatEL4-linux 1 cache
i386-redhatEL4-linux 1 systemnode
#gfhost -l 显示如下:
0.00/0.00/0.00 s i386-redhatEL4-linux 1 cache(172.20.67.125)
0.00/0.00/0.00 s i386-redhatEL4-linux 1 systemnode(172.20.67.122)
#gfps---------------------------如果没有任何信息显示则为配置正确
以上红色部分的检测在每个节点上都可以。
#ls -l /gfarm 显示如下:
总用量 0
drwxr-xr-x 32000 root root 0 12月 3 18:18 root
# bash
# cd /gfarm/~
# ls -la
# pwd
# vi test 添加一些内容如下:
Please test this page !
进入gfarm file system node节点检测一下:
# cd /var/gfarm-spool/root/
#ls 显示如下:
test:0
# more test:0 显示内容和gfarm client节点上的内容一样如下:
Please test this page !
这样就表示gfarm 文件系统整体配置成功。
三、NFS的配置
a、fuse的安装(这里我们把它装在gfarm的客户端)
#cd /usr/local
#rpm -ivh fuse-2.6.3-0.src.rpm
#cd /usr/src/redhat/SPECS
#rpmbuild -bb fuse.spec
#cd /usr/src/redhat/RPMS/i386
#rpm -Uvh fuse-libs-2.6.3-0.i386.rpm
#rpm -Uvh fuse-2.6.3-0.i386.rpm
#rpm -Uvh fuse-debuginfo-2.6.3-0.i386.rpm
#rpm -Uvh fuse-devel-2.6.3-0.i386.rpm
#rpm -Uvh fuse-kernel-2.6.3-0.i386.rpm
#modinfo fuse 显示如下:
filename: /lib/modules/2.6.9-42.ELsmp/kernel/fs/fuse/fuse.ko
alias: char-major-10-229
author: Miklos Szeredi <>
description: Filesystem in Userspace
license: GPL
vermagic: 2.6.9-42.ELsmp SMP 686 REGPARM 4KSTACKS gcc-3.4
#modprobe fuse
#lsmod |grep fuse 显示如下:
fuse 48660 0
#cd /usr/local
# rpm -Uvh gfarm-gsi-devel-1.4.1-0.i386.rpm
#rpm -ivh gfarmfs-fuse-2.0.0-1.src.rpm
#cd /usr/src/redhat/SPECS
#rpmbuild -bb gfarmfs.spec
#cd /usr/src/redhat/RPMS/i386
#rpm -Uvh gfarmfs-fuse-debuginfo-2.0.0-1.i386.rpm
#rpm -Uvh gfarmfs-fuse-2.0.0-1.i386.rpm
b、nfs的配置(此时把gfarm的客户端当作nfs服务的服务器端)
#mkdir /root/fuse -----------------这个目录用来挂载gfarm文件系统,并提供给nfs客户端
#gfarmfs -lsub /root/fuse -o kernel_cache----把gfarm文件系统挂载到本地/root/fuse这个目录
#vi /etc/exports 添加如下:
/root/fuse/ *(rw,fsid=10,anonuid=1205)
#wq!
c、nfs的客户端的配置
#mkdir /usr/local/mount
#mount -t nfs 172.20.67.241:/root/fuse /usr/local/mount
----这样nfs 的客户端就可以通过nfs访问gfarm文件系统了。