HDFS(HDFS NFS Gateway)のマウント
2763 ワード
0.依存パッケージのインストール yum install -y showmount
1.プロファイルの変更
core-siteを修正します.xml
hadoop.proxyuser.root.groups
*
The 'nfsserver' user is allowed to proxy all members of the 'users-group1' and
'users-group2' groups. Note that in most cases you will need to include the
group "root" because the user "root" (which usually belonges to "root" group) will
generally be the user that initially executes the mount on the NFS client system.
Set this to '*' to allow nfsserver user to proxy any group.
hadoop.proxyuser.root.hosts
*
This is the host where the nfs gateway is running. Set this to '*' to allow
requests from any hosts to be proxied.
hdfs-siteを変更します.xml
nfs.dump.dir
/tmp/.hdfs-nfs
nfs.rtmax
1048576
This is the maximum size in bytes of a READ request supported by the NFS gateway. If you change this, make sure you also update the nfs mount's rsize(add rsize= # of bytes to the mount directive).
nfs.wtmax
65536
This is the maximum size in bytes of a WRITE request supported by the NFS gateway. If you change this, make sure you also update the nfs mount's wsize(add wsize= # of bytes to the mount directive).
nfs.exports.allowed.hosts
* rw
rw
2.hadoopクラスタサービスの再起動 sbin/stop-all.sh
sbin/start-all.sh
# ,
sbin/stop-dfs.sh
sbin/stop-yarn.sh
sbin/start-dfs.sh
sbin/start-yarn.sh
3.hadoop nfsの起動 systemctl stop rpcbind
systemctl stop nfs
# , portmap , 111
sbin/hadoop-daemon.sh --script bin/hdfs start portmap
sbin/hadoop-daemon.sh --script bin/hdfs start nfs3
4.マウント mount -t nfs -o vers=3,proto=tcp,nolock,noacl,sync ceph-1:/ /mnt/hdfs
注意:
yum install -y showmount
core-siteを修正します.xml
hadoop.proxyuser.root.groups
*
The 'nfsserver' user is allowed to proxy all members of the 'users-group1' and
'users-group2' groups. Note that in most cases you will need to include the
group "root" because the user "root" (which usually belonges to "root" group) will
generally be the user that initially executes the mount on the NFS client system.
Set this to '*' to allow nfsserver user to proxy any group.
hadoop.proxyuser.root.hosts
*
This is the host where the nfs gateway is running. Set this to '*' to allow
requests from any hosts to be proxied.
hdfs-siteを変更します.xml
nfs.dump.dir
/tmp/.hdfs-nfs
nfs.rtmax
1048576
This is the maximum size in bytes of a READ request supported by the NFS gateway. If you change this, make sure you also update the nfs mount's rsize(add rsize= # of bytes to the mount directive).
nfs.wtmax
65536
This is the maximum size in bytes of a WRITE request supported by the NFS gateway. If you change this, make sure you also update the nfs mount's wsize(add wsize= # of bytes to the mount directive).
nfs.exports.allowed.hosts
* rw
rw
2.hadoopクラスタサービスの再起動 sbin/stop-all.sh
sbin/start-all.sh
# ,
sbin/stop-dfs.sh
sbin/stop-yarn.sh
sbin/start-dfs.sh
sbin/start-yarn.sh
3.hadoop nfsの起動 systemctl stop rpcbind
systemctl stop nfs
# , portmap , 111
sbin/hadoop-daemon.sh --script bin/hdfs start portmap
sbin/hadoop-daemon.sh --script bin/hdfs start nfs3
4.マウント mount -t nfs -o vers=3,proto=tcp,nolock,noacl,sync ceph-1:/ /mnt/hdfs
注意:
sbin/stop-all.sh
sbin/start-all.sh
# ,
sbin/stop-dfs.sh
sbin/stop-yarn.sh
sbin/start-dfs.sh
sbin/start-yarn.sh
systemctl stop rpcbind
systemctl stop nfs
# , portmap , 111
sbin/hadoop-daemon.sh --script bin/hdfs start portmap
sbin/hadoop-daemon.sh --script bin/hdfs start nfs3
4.マウント mount -t nfs -o vers=3,proto=tcp,nolock,noacl,sync ceph-1:/ /mnt/hdfs
注意:
mount -t nfs -o vers=3,proto=tcp,nolock,noacl,sync ceph-1:/ /mnt/hdfs