nfs

Why does NFS use UDP by default?

别等时光非礼了梦想. 提交于 2019-12-31 17:54:20
问题 I'm sure there's some ancient legacy reason for it, but what is it? It seems like a service that's geared towards reliable data delivery. 回答1: NFS was originally designed to be used on a LAN where loss rates are very low. UDP is faster, and has less overhead NFS is stateless, so it's simple for clients to retry Note that NFS v3+ can use TCP. 回答2: UDP is the default for NFSv2 (which nobody should really use these days) but NFSv3 use TCP by default. TCP mounts are more reliable and you know you

How can I tell if a file is on a remote filesystem with Perl?

守給你的承諾、 提交于 2019-12-31 10:43:11
问题 Is there a quick-and-dirty way to tell programmatically, in shell script or in Perl, whether a path is located on a remote filesystem (nfs or the like) or a local one? Or is the only way to do this to parse /etc/fstab and check the filesystem type? 回答1: stat -f -c %T <filename> should do what you want. You might also want -l 回答2: You can use "df -T" to get the filesystem type for the directory, or use the -t option to limit reporting to specific types (like nfs) and if it comes back with "no

Vagrant error: NFS is reporting that your exports file is invalid

与世无争的帅哥 提交于 2019-12-31 07:52:11
问题 I am trying to set up the Discourse development environment using these instructions. However when I run Vagrant I get the error: NFS is reporting that your exports file is invalid. Vagrant does this check before making any changes to the file. Please correct the issues below and execute "vagrant reload": Can't open /etc/exports I checked, and I don't have an etc/exports folder, so I created one and ran vagrant reload . This got me: /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.1

Typechecking Hack code on VirtualBox via NFS shared folder

半世苍凉 提交于 2019-12-31 07:00:24
问题 It seems prudent to first mention this issue and then this aptly-named edit which seems related and has made hh_server refuse to run on NFS file systems. I am not very familar with file systems and have never touched OCaml before, so in trying to accomplish the question title, I have tried editing what I know: /etc/hh.conf and /etc/hhvm/{php, server}.ini , adding hhvm.[server.]enable_on_nfs = true by pure guesswork. No dice. As I understand it from the issue, the change stems from the hh

Ubuntu 11.04 NFS 配置

半腔热情 提交于 2019-12-29 00:28:01
安装 NFS 相关组件 sudo apt-get install nfs-kernel-server 增加 NFS 目录 sudo gedit /etc/exports#在文件中添加如下内容/var/nfsboot *(rw,sync) /var/nfsboot 为 NFS 共享目录,可自由指定 × 表示任意的 IP 地址都可以挂载此目录,若设置为 192.168.1.× 则表示只有在 192.168.1.??? 这个网段的 IP 才可以挂载 rw 可读写的权限 ro 只读的权限 no_root_squash NFS 客户端分享目录使用者的权限,即如果客户端使用的是 root 用户,那么对于这个共享的目录而言,该客户端就具有 root 的权限, 若是以NFS挂载根文件系统时,必须设置此项 sync 资料同步写入到内存与硬盘当中 async 资料会先暂存于内存当中,而非直接写入硬盘 服务操作指令 # 停止sudo /etc/init.d/nfs-kernel-server stop# 启动sudo /etc/init.d/nfs-kernel-server start# 重新启动sudo /etc/init.d/nfs-kernel-server restart 测试 # 将 /var/nfsboot 目录挂在在 /mut 下# 挂载成功后可用 df 命令查看sudo mount

Mounting nfs shares inside docker container

眉间皱痕 提交于 2019-12-28 03:37:38
问题 Does anyone know how to mount nfs share inside docker container with centos base image? I've tried this command: mount server:/dir /mount/point and got the next error: mount.nfs: rpc.statd is not running but is required for remote locking. mount.nfs: Either use '-o nolock' to keep locks local, or start statd. mount.nfs: an incorrect mount option was specified when I try to use it with -o nolock option, the error is: mount.nfs: Operation not permitted 回答1: For using mount , you'll need the CAP

inotify with NFS

社会主义新天地 提交于 2019-12-27 13:37:50
问题 I've recently created a dropbox system using inotify, watching for files created in a particular directory. The directory I'm watching is mounted from an NFS server, and inotify is behaving differently than I'd expect. Consider the following scenario in which an inotify script is run on machine A, watching /some/nfs/dir/also/visible/to/B. -Using machine A to create a file in /some/nfs/dir/also/visible/to/B, the script behaves as expected. Using machine B to carry out the same action, the

k8s存储卷

試著忘記壹切 提交于 2019-12-27 10:21:00
1.emptyDir存储卷 apiVersion: v1 kind: Pod metadata: name: cunchujuan spec: containers: - name: myapp #定义第一容器用于显示index.html文件内容 image: ikubernetes/myapp:v1 imagePullPolicy: IfNotPresent volumeMounts: #调用存储卷 - name: html #使用存储卷的名称要和下面定义的一样 mountPath: /usr/share/nginx/html/ #在容器内部挂载的路径 - name: busybox #定义第二个容器用于产生index.html内容 image: busybox:latest imagePullPolicy: IfNotPresent volumeMounts: - name: html mountPath: /data/ command: ['/bin/sh','-c','while true;do echo $(date) >> /data/index.html;sleep 2;done'] #该命令会不停向,存储卷的index.html文件追加时间 volumes: #定义存储卷 - name: html #定义存储卷名称 emptyDir: {} #定义存储卷类型 在上面

k8s存储卷

梦想的初衷 提交于 2019-12-27 10:16:39
1.emptyDir存储卷 apiVersion: v1 kind: Pod metadata: name: cunchujuan spec: containers: - name: myapp #定义第一容器用于显示index.html文件内容 image: ikubernetes/myapp:v1 imagePullPolicy: IfNotPresent volumeMounts: #调用存储卷 - name: html #使用存储卷的名称要和下面定义的一样 mountPath: /usr/share/nginx/html/ #在容器内部挂载的路径 - name: busybox #定义第二个容器用于产生index.html内容 image: busybox:latest imagePullPolicy: IfNotPresent volumeMounts: - name: html mountPath: /data/ command: ['/bin/sh','-c','while true;do echo $(date) >> /data/index.html;sleep 2;done'] #该命令会不停向,存储卷的index.html文件追加时间 volumes: #定义存储卷 - name: html #定义存储卷名称 emptyDir: {} #定义存储卷类型 在上面

NFS的搭建(linux-linux)

人走茶凉 提交于 2019-12-26 19:47:34
准备一台服务器和一台客户端 首先在 服务器 安装nfs-ntils和rpcbind [root@localhost ~]# yum -y install nfs-utils rpcbind 修改配置文件,允许客户端访问 [root@localhost ~]# vim /etc/exports [root@localhost ~]# cat /etc/exports /home/xxx 192.168.1.210(rw) 创建目录并增加权限 [root@localhost ~]# mkdir /home/xxx [root@localhost ~]# chomd 777 /home/xxx 开启服务,开启的顺序不能改变 [root@localhost ~]# systemctl start rpcbind [root@localhost ~]# systemctl start nfs 关闭防火墙,降低沙盒等级 [root@localhost ~]# systemctl stop firewalld [root@localhost ~]# setenforce 0 在 客户端 安装nfs-ntils和rpcbind [root@localhost ~]# yum -y install nfs-utils rpcbind 开启服务 [root@localhost ~]#