[root@k8s-dbg-master-1 build]# showmount -e Export list for k8s-dbg-master-1: /data/nfs-storage *
2.2 客户端
2.2.1. 安装nfs-utils的包
1
yum install nfs-utils.x86_64 -y
2.2.2. 创建挂载点
客户端挂载目录:/mnt/store
1
mkdir /mnt/store
2.2.3. 查看NFS服务器的共享
1 2 3
root@k8s-dbg-node-5:~# showmount -e 172.16.5.4 Export list for 172.16.5.4: /data/nfs-storage *
2.2.4. 挂载
1 2 3 4
mount -t nfs <NFS_SERVER_IP>:<NFS_SERVER_SHARED_DIR> <NFS_CLIENT_MOUNT_DIR>
#例如: mount -t nfs 172.16.5.4:/data/nfs-storage /mnt/store
2.2.5. 验证挂载信息
使用mount命令
1 2
root@k8s-dbg-node-5:~# mount |grep /mnt/store 172.16.5.4:/data/nfs-storage/k8s-storage/ssd on /mnt/store type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=172.16.200.24,local_lock=none,addr=172.16.5.4)