nfs挂载文件
1. 安装必备插件 以防centos7默认没有启动nfs服务
yum -y install nfs-utils rpcbind
- # 启动 rpcbind 和配置开机自启动
- systemctl start rpcbind
- systemctl enable rpcbind
- # 启动 nfs 和配置开机自启动
- systemctl start nfs
- systemctl enable nfs
重启服务
service nfs restart
- [root@master nfs]# ps -ef|grep nfs
- root : ? :: [nfsd4_callbacks]
- root : ? :: [nfsd]
- root : ? :: [nfsd]
- root : ? :: [nfsd]
- root : ? :: [nfsd]
- root : ? :: [nfsd]
- root : ? :: [nfsd]
- root : ? :: [nfsd]
- root : ? :: [nfsd]
- root : ? :: [nfsv4.-svc]
- root : pts/ :: grep --color=auto nfs
- root : ? :: [nfsiod]
- root : ? :: [nfsv4.-svc]
2. 设置共享目录 去掉密码校验insecure
vim /etc/exports
增加一行
/mnt/nfs/ *(insecure,rw,async,no_root_squash)
如果是挂载到另外一台服务器
/mnt/nfs/ 172.19.68.10(insecure,rw,async,no_root_squash)
3. 重启直接用命令挂载
创建目录
mkdir /mnt/nfs
sudo mount -t nfs 172.19.68.9:/mnt/nfs/ /mnt/nfs
查看挂载的目录
nfsstat -m
显示共享目录的情况
showmount -e
附录deployment.yaml内容
kubectl replace -f deployment.yaml
- apiVersion: v1
- kind: ServiceAccount
- metadata:
- name: nfs-client-provisioner
- ---
- kind: Deployment
- apiVersion: extensions/v1beta1
- metadata:
- name: nfs-client-provisioner
- spec:
- replicas:
- strategy:
- type: Recreate
- template:
- metadata:
- labels:
- app: nfs-client-provisioner
- spec:
- serviceAccount: nfs-client-provisioner
- containers:
- - name: nfs-client-provisioner
- image: quay.io/external_storage/nfs-client-provisioner:latest
- volumeMounts:
- - name: nfs-client-root
- mountPath: /persistentvolumes
- env:
- - name: PROVISIONER_NAME
- value: fuseim.pri/ifs
- - name: NFS_SERVER
- value: 172.19.68.9
- - name: NFS_PATH
- value: /mnt/nfs
- volumes:
- - name: nfs-client-root
- nfs:
- server: 172.19.68.9
- path: /mnt/nfs
这篇详细https://blog.csdn.net/qq_35992900/article/details/80446005
nfs挂载文件的更多相关文章
- 4.13、nfs挂载优化及优缺点
1.硬盘:sas/ssd磁盘,买多块,硬件raid5/raid0,网卡吞吐量要大,至少千兆(多网卡bond0) 2.nfs客户端挂载说明: 文件系统有自己的权限,挂载是建立在文件系统之上的,然后更改挂 ...
- nfs 动态文件挂载读写权限设置
nfs 动态文件挂载读写权限设置 待办 ll 命令查看文件夹权限 参考设置共享文件夹https://www.linuxidc.com/Linux/2018-11/155331.htm
- nfs挂载配置
nfs挂载步骤 服务器端 1.安装nfs-utils rpcbind $sudo yum –y install nfs-utils rpcbind 2.文件开放出去配置/etc/exports 例子: ...
- linux挂载文件
Linux挂载Winodws共享文件夹 mount -t cifs -o username=***,password=*** //192.168.1.48/share /mnt 其中-t表示要挂载的类 ...
- TQ210开发板NFS挂载android4.0.4的rootfs的方法
首先声明的是,我使用的u-boot是自己移植的u-boot2013.01.01而非天嵌官方的那个,至于使用官方的u-boot如何去实现nfs挂载rootfs我没怎么研究过,不过原理方法都是一致的. 主 ...
- linux下使用NFS挂载文件系统
转自linux如何使用NFS挂载文件系统 设备:一台服务器和一台客户端,这里我们把装在PC机上的RedHat作为服务器,而客户端则是嵌入式linux开发板. 环境:开发板已启动,连接好串口和网线,串口 ...
- Ubuntu开启NFS,挂载根目录
1.安装NFS server Ubuntu初始状态是没有NFS server的,首先要安装NFS server: $ sudo apt-get install nfs-kernel-server (安 ...
- mkyaffs2image制作根文件系统、使用NFS挂载虚拟机目录(2)
1.制作根文件系统及nfs烧写 1.1 先解压文件系统,/wok/nfs_root 目录下是已经构造好的各种文件系统:① fs_mini.tar.bz2 是最小的根文件系统,里面的设备节点是事先建立好 ...
- Linux NFS挂载
Linux NFS挂载 一.NFS挂载 192.25.10.101/home/sharedata/azkaban/ODS_HS08 挂载到 192.25.10.102/home/data_azkaba ...
随机推荐
- HTMLPage测试js通过ajax调用
HTMLPage测试js通过ajax调用接口 <!DOCTYPE html> <html lang="en" xmlns="http://www.w3. ...
- JVM常量的含义与反编译助记符详解
1.定义一个常量 public class MyTest2 { public static void main(String[] args) { System.out.println(MyParent ...
- Spring Boot核心原理
Spring Boot核心原理 spring-boot-starter-xxx 方便开发和配置 1.没有depoy setup tomcat 2.xml文件里面的没有没有了 @SpringBootA ...
- 微信小程序带cookie的request请求代码封装(小程序使用session)
微信小程序带cookie的request请求可,以使服务端知道是同一个客户端请求. session_id会不变,从而很好的使用服务端的session. 写一个工具函数,直接导入使用即可,接口同 wx. ...
- vim 外部粘贴代码,如何保持原格式,而不持续缩进
主要内容:使用“:set paste” 来实现vim 按照源文件格式复制 在vim 使用中偶尔要复制外部代码,常常出现不停缩进的问题: 怎么避免此种情况出现呢 可以在命令模式中使用“:set past ...
- 阿里druid连接池监控数据自定义存储
如何将druid连接池监控到的sql执行效率,连接池资源情况等进行持久化存储,方便系统运维分析优化,以下案例初步测试成功. 第一部: 新建MyDruidStatLogger类实现接口 extends ...
- linux: E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
今天在使用ubuntu执行下列指令的时候出现了错误: sudo apt-get update 解决办法: 输入以下命令: sudo rm /var/cache/apt/archives/lock su ...
- Linux防火墙白名单设置
在linux系统中安装yum install iptables-services 然后 vi /etc/sysconfig/iptables # Generated by iptables-save ...
- Android平台云端打包证书使用说明
原贴:https://ask.dcloud.net.cn/article/35985 Android平台云端打包证书使用说明 分类:HBuilderX 证书 Android 签名证书是一个应用的所有者 ...
- MFC加载大型osg模型
MFC加载模型,发现打开 Navid 缓冲等选项后,加载大型模型的速度就快了很多. #include "stdafx.h" #include "OSGObject.h&q ...