nfs

配置NFS服务

徘徊边缘 提交于 2019-12-26 17:02:39
配置NFS服务 服务端 ip :192.168.1.10 客户端 ip :192.168.1.227 (服务端与客户端均须关闭防火墙、降低沙盒) 服务端配置 用 yum 安装 nfs 以及rpcbind [root@bogon ~]# yum -y install nfs-utils rpcbind 编辑配置文件客户端访问,内容如下图 [root@bogon ~]# vim /etc/exports 创建目录 /home/xyl ,并赋予其权限 [root@bogon ~]# mkdir /home/xyl [root@bogon ~]# chmod 777 /home/xyl/ 按如下顺序开启服务 [root@bogon ~]# systemctl start rpcbind 关闭防火墙 [root@bogon ~]# systemctl start nfs [root@bogon ~]# systemctl stop firewalld 降低沙盒 [root@bogon ~]# getenforce Enforcing [root@bogon ~]# setenforce 0 [root@bogon ~]# getenforce Permissive 查看是否能 ping 通客户端 [root@bogon ~]# ping 192.168.1.227 客户端配置 用 yum

NFS服务搭建

久未见 提交于 2019-12-26 16:03:53
NFS服务搭建 准备两台虚拟机,服务端和客户端。 IP分别是192.168.1.145 192.168.1.234 操作服务端: [root@localhost ~]# yum -y install nfs-utils rpcbind 编辑配置文件。 [root@localhost ~]# vim /etc/exports [root@localhost ~]# cat /etc/exports /home/xxx 192.168.1.234(rw) [root@localhost ~]# mkdir /home/xxx [root@localhost ~]# chmod 777 /home/xxx 开启服务(开启顺序不能变)。 [root@localhost ~]# systemctl start rpcbind [root@localhost ~]# systemctl start nfs 关闭防火墙,降低沙盒。 [root@localhost ~]# systemctl stop firewalld [root@localhost ~]# setenforce 0 操作客户端: [root@localhost ~]# yum -y install nfs-utils rpcbind 开启服务。 [root@localhost ~]# systemctl start

NFS服务搭建Linux-Windows

☆樱花仙子☆ 提交于 2019-12-26 13:54:38
准备环境 1、一台Windows系统、一台Linux Linux搭建 [root@bogon ~]# yum -y install nfs-utils rpcbind //安装nfs-utils和rpcbind包 [root@bogon ~]# vim /etc/exports //修改配置文件,允许共享IP /home/zym 192.168.1.0/24(rw,sync,all_squash,anonuid=1000,anongid=1000) //添加此行 保存并退出 [root@bogon ~]# mkdir /home/zym //创建共享目录 [root@bogon ~]# chmod 777 /home/zym/ //给予权限 [root@bogon ~]# systemctl start rpcbind //启动rpcbind [root@bogon ~]# systemctl start nfs //启动nfs [root@bogon ~]# systemctl enable nfs //设置开机自启动nfs [root@bogon ~]# systemctl stop firewalld //关闭防火墙 [root@bogon ~]# setenforce 0 //降低沙盒等级 windows配置 打开控制面板 点击程序 点开启用或关闭Windows

linux NFS 服务

十年热恋 提交于 2019-12-25 22:24:09
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 一、NFS服务简介   NFS 是Network File System的缩写,即网络文件系统。一种使用于分散式文件系统的协定,由Sun公司开发,于1984年向外公布。功能是通过网络让不同的机器、不同的操作系统能够彼此分享个别的数据,让应用程序在客户端通过网络访问位于服务器磁盘中的数据,是在类Unix系统间实现磁盘文件共享的一种方法。   NFS 的基本原则是“容许不同的客户端及服务端通过一组RPC分享相同的文件系统”,它是独立于操作系统,容许不同硬件及操作系统的系统共同进行文件的分享。   NFS在文件传送或信息传送过程中依赖于RPC协议。RPC,远程过程调用 (Remote Procedure Call) 是能使客户端执行其他系统中程序的一种机制。NFS本身是没有提供信息传输的协议和功能的,但NFS却能让我们通过网络进行资料的分享,这是因为NFS使用了一些其它的传输协议。而这些传输协议用到这个RPC功能的。可以说NFS本身就是使用RPC的一个程序。或者说NFS也是一个RPC SERVER。所以只要用到NFS的地方都要启动RPC服务,不论是NFS SERVER或者NFS CLIENT。这样SERVER和CLIENT才能通过RPC来实现PROGRAM PORT的对应。可以这么理解RPC和NFS的关系

架构—NFS基础

允我心安 提交于 2019-12-25 07:30:24
一、什么是NFS? 文件系统,共享文件 NFS是Network File System的缩写及网络文件系统。NFS主要功能是通过局域网络让不同的主机系统之间可以共享文件或目录。NFS系统和Windows网络共享、网络驱动器类似, 只不过windows用于局域网, NFS用于企业集群架构中, 如果是大型网站, 会用到更复杂的分布式文件系统FastDFS,glusterfs,HDFS(hadoop),caph 二、为什么用NFS? 1.实现多台服务器之间数据共享 2.实现多台服务器之间数据一致 集群没有共享存储 1.A用户上传图片经过负载均衡,负载均衡将上传请求调度至WEB1服务器上。 2.B用户访问A用户上传的图片,此时B用户被负载均衡调度至WEB2上,因为WEB2上没有这张图片,所以B用户无法看到A用户传的图片。 集群有共享存储 1.A用户上传图片无论被负载均衡调度至WEB1还是WEB 2, 最终数据都被写入至共享存储2.B用户访问A用户上传图片时,无论调度至WEB1还是WEB2,最终都会上共享存储访问对应的文件,这样就可以访问到资源了 三、NFS原理 本地文件的操作方式 1.当用户执行mkdir命令, 该命令会调用shell解释器翻译给内核。 2.内核解析完成后会驱动对应的硬件设备,完成相应的操作。 NFS远程原理 1.用户进程访问NFS客户端,使用不同的函数对数据进行处理 2

nfs encoding issue

北慕城南 提交于 2019-12-25 03:14:04
问题 I have a Celerra NS-20 that export a filesystem with cifs and nfs. The files are written by windows machines. When I mount the cifs in linux all filename special characters are ok, but when mount the nfs (same filesystem) the filenames special character are broken. Are there a way to mount the filesystem changing the encoding ? 回答1: We have the same issue with a new VNX 5300 and the resolution was to enable the NFSv4 protocol in the VNX, by default its only support v3. For that, edit: /nas

File r/w locking and unlink

不羁的心 提交于 2019-12-25 00:36:20
问题 I have following problem. I want to create a file system based session storage where each session data is stored in simple file named with session ids. I want following API: write(sid,data,timeout) , read(sid,data,timeout) , remove(sid) where sid==file name, Also I want to have some kind of GC that may remove all timed-out sessions. Quite simple task if you work with single process but absolutly not trivial when working with multiple processes or even over NFS. The simplest solution I thought

Docker Create Volume With Mountpoint

廉价感情. 提交于 2019-12-24 20:40:33
问题 i want to create a volume in docker/portainer for my raspberri pi's. i have set up a NFS server on one of the pi's and connected the other pi so that it can read/write to the NFS. (this is working as expected). i now want to make a named docker volume so that i can use volume in portainer. looking at the documentation, i have created the following command: https://docs.docker.com/engine/reference/commandline/volume_create/#driver-specific-options sudo docker volume create --driver local \ -

13-4 14-15 NFS exportfs 客户端bug FTP vsftp

☆樱花仙子☆ 提交于 2019-12-24 11:36:45
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 14.4 exportfs命令 exprotfs可以网络广播nfs下的磁盘操作 常用选项 -a 全部挂载或者全部卸载 -r 重新挂载 -u 卸载某一个目录 -v 显示共享目录 需要操作在服务端上 [root@axiang-02 ~]# vim /etc/exports 再加入一行 /tmp 10.1.1.9(rw,sync,no_root_squash) //这里不限制root用户 [root@axiang-02 ~]# exportfs -arv exporting 10.1.1.9:/tmp exporting 10.1.1.0/24:/home/nfstestdir exportfs -arv 不用重启nfs服务就可以生效 客户端 [root@axiang-03 ~]# showmount -e 10.1.1.8 Export list for 10.1.1.8: /home/nfstestdir 10.1.1.0/24 /tmp 10.1.1.9 [root@axiang-03 ~]# mount -t nfs 10.1.1.8:/tmp/ /mnt [root@axiang-03 ~]# vim /mnt/1 [root@axiang-03 ~]# ls -l !$ ls -l /mnt/1 -rw

Kubernetes NFS PersistentVolumeClaim has status Pending

邮差的信 提交于 2019-12-24 06:52:39
问题 I am trying to configure my Kubernetes cluster to use a local NFS server for persistent volumes. I set up the PersistentVolume as follows: apiVersion: v1 kind: PersistentVolume metadata: name: hq-storage-u4 namespace: my-ns spec: capacity: storage: 10Ti accessModes: - ReadWriteMany persistentVolumeReclaimPolicy: Retain nfs: path: /data/u4 server: 10.30.136.79 readOnly: false The PV looks OK in kubectl $ kubectl get pv NAME CAPACITY ACCESSMODES RECLAIMPOLICY STATUS CLAIM STORAGECLASS REASON