Hadoop

97.HDFS文件系统挂载

2022-01-24  本文已影响0人  大勇任卷舒

97.1 演示环境介绍

97.2 操作演示

Linux下挂载NFS文件系统

[ec2-user@ip-186-31-21-45 ~]$ sudo yum -y install nfs-utils*
[ec2-user@ip-186-31-21-45 ~]$ sudo mkdir /hdfs_nfs_mount
<pre style="margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(51, 51, 51); font-size: 17px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(253, 246, 227);">[ec2-user@ip-186-31-21-45 ~]$ sudo mount -t nfs -o vers=3,proto=tcp,nolock ip-186-31-26-80.ap-southeast-1.compute.internal:/ /hdfs_nfs_mount</pre>

自动挂载NFS文件系统

<pre style="margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important; color: rgb(51, 51, 51); font-size: 17px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: 0.544px; orphans: 2; text-align: justify; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; background-color: rgb(253, 246, 227);">[ec2-user@ip-186-31-21-45 ~]$ sudo vim /etc/fstab #
# /etc/fstab
# Created by anaconda on Tue Oct 25 15:56:15 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
# UUID=d8048d39-5ce3-4cdf-9115-416a99b36906 / xfs     defaults 0 0 ip-186-31-26-80.ap-southeast-1.compute.internal:/ /hdfs_nfs_mount nfs     defaults 0 0</pre>

验证NFS挂载

[ec2-user@ip-186-31-21-45 ~]$ cd /hdfs_nfs_mount/
[ec2-user@ip-186-31-21-45 hdfs_nfs_mount]$ ll
[ec2-user@ip-186-31-21-45 ~]$ cp fayson.keytab /hdfs_nfs_mount/fayson/
[ec2-user@ip-186-31-21-45 ~]$ ll /hdfs_nfs_mount/fayson/
total 28181
-rw------- 1 ec2-user 2584148964      514 Dec 27 08:39 fayson.keytab
-rw-r--r-- 1 ec2-user 2584148964 28855325 Oct  3 10:28 item.csv
[ec2-user@ip-186-31-21-45 ~]$ 

大数据视频推荐:
腾讯课堂
CSDN
大数据语音推荐:
企业级大数据技术应用
大数据机器学习案例之推荐系统
自然语言处理
大数据基础
人工智能:深度学习入门到精通

上一篇 下一篇

猜你喜欢

热点阅读