分类: LINUX
2013-07-01 17:55:17
一、Server 端配置 (root@hz-search-zookeeper-01)
su - hbase -c "mkdir /home/hbase/hadoop_nfs && chmod 777 /home/hbase/hadoop_nfs"
echo '/home/hbase/hadoop_nfs 172.20.0.0/16(rw)' > /etc/exports
/etc/init.d/portmap stop
/etc/init.d/nfs stop
/etc/init.d/nfslock stop
/etc/init.d/portmap start
/etc/init.d/nfs start
/etc/init.d/nfslock start
二、Client 端配置 (hadoop namenode)
su - hbase -c "mkdir -p /home/hbase/hadoop_nfs/name"
/etc/init.d/nfslock start
mount -t nfs hz-search-zookeeper-01:/home/hbase/hadoop_nfs/ /home/hbase/hadoop_nfs/name
echo 'mount -t nfs hz-search-zookeeper-01:/home/hbase/hadoop_nfs/ /home/hbase/hadoop_nfs/name' >> /etc/rc.d/rc.local
三、配置dfs.name.dir为两份,并重启 hadoop 使其生效