HDFSのNFS Gatewayを試してみた

CDH5.0がリリースされていたのでHDFSのNFSGatewayを試した。
ClouderaManagerからnfsgatewayを追加して起動するだけ。
nfsgatewayを動かすホストでportmapサービスが動いていないと起動に失敗した。
CentOS6.5だと、portmapサービスはrpcbindで起動できる。

[root@master1 ~]# service rpcbind start
Starting rpcbind:                                          [  OK  ]

マウントする

別のCentOSのホストからマウントする。nfs-utilsを入れてrpcbindを起動しておく。

[tokibito@centos ~]$ sudo yum install nfs-utils
[tokibito@centos ~]$ sudo service rpcbind start
[tokibito@centos ~]$ sudo mount -t nfs -o vers=3,proto=tcp,nolock 192.168.11.111:/ /mnt/
[tokibito@centos ~]$ ls /mnt/
tmp
[tokibito@centos ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       18G  1.1G   16G   7% /
tmpfs                 496M     0  496M   0% /dev/shm
/dev/xvda1            485M   75M  385M  17% /boot
192.168.11.111:/       47G   17G   30G  36% /mnt

最初に試した時マウントがうまくいかなくて、nfsgatewayを再起動したりしてたらうまくいった。詳細まで調べてない。
NFSでマウントできるとLinuxのコマンドツールで操作できたり、MacOSXではFinderから操作できるのがうれしいですね。