Hadoop의 HDFS(Hadoop Distributed File System)를 NFS(Network File System) 서버로 활용 할수 있습니다.
Hadoop에서 NFSv3 버전과 Portmap 서비스를 지원 하므로 리눅스 서버의 실행 중인 nfs, rpcbind 서비스를 중지 합니다.
[root@ruo91 ~]# service nfs stop
[root@ruo91 ~]# service rpcbind stop
Hadoop의 Portmap, NFSv3를 UNIX signal handlers로 서비스를 실행 시킵니다.
[root@ruo91 ~]# hdfs –help | egrep ‘portmap|nfs3’
portmap run a portmap service
nfs3 run an NFS version 3 gateway
[root@ruo91 ~]# hdfs portmap &
[root@ruo91 ~]# hdfs nfs3 &
[root@ruo91~]# rpcinfo -p localhost
(PortmapMapping-100005:1:6:4242)
(PortmapMapping-100000:2:17:111)
(PortmapMapping-100005:3:6:4242)
(PortmapMapping-100005:2:17:4242)
(PortmapMapping-100003:3:6:2049)
(PortmapMapping-100000:2:6:111)
(PortmapMapping-100005:3:17:4242)
(PortmapMapping-100005:1:17:4242)
(PortmapMapping-100005:2:6:4242)
program vers proto port service
100005 1 tcp 4242 mountd
100000 2 udp 111 portmapper
100005 3 tcp 4242 mountd
100005 2 udp 4242 mountd
100003 3 tcp 2049 nfs
100000 2 tcp 111 portmapper
100005 3 udp 4242 mountd
100005 1 udp 4242 mountd
100005 2 tcp 4242 mountd
[root@ruo91~]# showmount -e localhost
Export list for localhost:
/ *
[root@ruo91 ~]# mkdir /hdfs
[root@ruo91 ~]# mount -t nfs -o vers=3,proto=tcp,nolock localhost:/ /hdfs
[root@ruo91 ~]# mount | grep hdfs
localhost:/ on /hdfs type nfs (rw,vers=3,proto=tcp,nolock,addr=127.0.0.1)
[root@ruo91 ~]# hadoop fs -ls /logs