nfs

NFS root mount for embedded system (NFSv2/v3/4) RHEL/Ubuntu

微笑、不失礼 提交于 2019-12-01 12:34:49
Example on HOST side /etc/exports #/home/lake *(rw,subtree_check,no_root_squash,sync,insecure) #/home/lake/nfs-boot-x86 *(rw,subtree_check,no_root_squash,sync,insecure) #/home/lake/nfs-boot-arm *(rw,subtree_check,no_root_squash,sync,insecure) ## nfs-boot-arm-gdbserver-glibcso? #/home/lake/nfs-boot *(rw,subtree_check,no_root_squash,sync,sync,insecure) Example on Device side? (RHEL7/Ubuntu18 uses nfsvers=4 by default) while most old embedded systems use nfsvers=3 qemu-system-arm ?-M ? ?integratorcp ? ? -nographic ? ?-m 128M -kernel integrator_qemu_defconfig_zImage -append "console=ttyAMA0 root=

CentOS7网络文件系统-NFS

南笙酒味 提交于 2019-12-01 10:06:38
一、 什么是NFS 网路文件系统(Network File System,NFS)由SUN公司开发, 功能是通过TCP/IP网络让不同的机器 不同的操作系统能够彼此分享数据, 让应用程序在客户端通过网络访问位于服务器磁盘中的数据, 是在Unix系统间实现磁盘文件共享的一种方法. 二、 NFS的优势 2.1 节省本地存储空间, 将常用的数据存放在一台NFS服务器上且可以通过网络络访问, 那么本地终端将可以减少自生身存储空间的使用. 2.2 配置相对简单 三. 工作原理 因为NFS支持的功能相当多, 而不同的功能都会使用不同的程序来启动, 每启动一个功能就会启用一些端口来传输数据; 因此NFS的功能所对应的端口才没有固定, 而是采用随机取用一些未被使用的小于724的端口来作为 传输之用; 但如此一来又造成客户端要连接服务器时的困扰, 因为客户端要知道服务器端的相关端口才能够联机, 此时我们需要用到RPC的服务. RPC最主要的功能就是指定每个NFS功能所对应的端口号, 并且回报给客户端, 让客户端可以连接到正确的端口上. 当服务器在启动NFS时会随机选选数个端口并主动地向RPC注册. 因此RPC可以知道每个端口对应的NFS功 能, 然后RPC固定使用端口111来监听客户端的请求并回报客户端正确的端口, 所以可以让NFS的启动更为容易. 注意启动NFS之前,

将iso mount 到nfs 目录问题

≡放荡痞女 提交于 2019-12-01 10:03:36
最近有个需求,需要在多台系统安装程序,安装文件是iso 格式的,最普通的办法就是拷贝到其它系统,然后mount loop 到本地目录。 但是比较麻烦,而且当前已经有一个nfs 服务端了,于是想出一个办法: 先将iso 拷贝到nfs 服务端, 然后mount 到nfs 路径下 /nfsshare/ 下的一个子目录 iso mount -o loop iso /nfsshare/iso 到其它系统里再mount 这个nfs shell mount -t nfs4 192.168.4.5:/nfsshare /mnt 当我准备去mnt 目录直接安装时,发现/mnt/iso 文件为空 那么问题来了,这样不行吗? 当我在nfs服务端umount /nfsshare/iso 后,向iso 添加一个文件test,再mount 回去 此时在客户端,看不到iso 内容,却能看见刚才添加的文件test 所以说nfs 没有将loop iso 共享出去了 换个方式吧,先将安装文件iso 拷贝到 /nfsshare/iso , 再到其它系统里 mount呢 mount -t nfs4 192.168.4.5:/nfsshare /mnt # 先mount nfs mount -o loop /mnt/iso/install.iso /installdir # 再mount iso 跑到/install

How does this canonical flock example work?

牧云@^-^@ 提交于 2019-12-01 08:22:53
When one must synchronize programs (shell scripts) via file system, I have found an flock -based solution to be recommended (should also work on NFS ). The canonical example for usage from within a script (from http://linux.die.net/man/1/flock ) is: ( flock -s 200 # ... commands executed under lock ... ) 200>/var/lock/mylockfile I don't quite get why this whole construct ensures atomicity. In particular, I am wondering in which order flock -s 200 and 200>/var/lock/mylockfile are executed when e.g. bash executes these lines of code. Is this order guaranteed/deterministic? The way I understand

Pushing to a Git repository on an NFS share fails

怎甘沉沦 提交于 2019-12-01 08:06:01
问题 We currently have our Git repositories on the local disk. They are shared by groups and accessed over SSH (with git-shell). Because of space issues, we now want to move the repositories to an NFS share on a NAS. I've been experimenting with this, and have run into a weird issue. A fresh (and bare) repository with exactly the same permissions can be cloned fine, but pushing changes (touch foo && git add foo && git commit && git push origin master) fails with the error "Couldn't set refs/heads

Ansible 流程控制

左心房为你撑大大i 提交于 2019-12-01 07:45:46
8.判断语句 1.centos和ubuntu系统都需要安装httpd, 判断系统. 2.安装软件仓库,只有web组的安装webtatic其他的主机全部跳过. 3.TASK任务, TASK1任务执行成功,才会执行TASK2 #根据不同的系统,安装不同的服务 - hosts: webservers tasks: - name: CentOS Installed Httpd Server yum: name: httpd state: present when: ( ansible_distribution == "CentOS" ) - name: Ubuntu Installed Httpd Server yum: name: httpd2 state: present when: ( ansible_distribution == "Ubuntu" ) [root@manager project1]# cat f16.yml - hosts: all tasks: - name: Add Nginx Yum Repository yum_repository: name: nginx description: Nginx Repository baseurl: http://nginx.org/packages/centos/7/$basearch/ when: ( ansible

Jenkins can't access mounted driver

心不动则不痛 提交于 2019-12-01 07:38:07
问题 My Jenkins server is running in Tomcat on Windows 2008 server. I have set up a NFS server on CentOS, Win2008 server can access the NFS shared folder via mount command. I tested it when running as administrator user on Windows. I mount the folder as Z driver on Windows 2008 server. But my job in Jenkins said it can't find the Z driver, I guess Jenkins web app might have not the enough permission to access Z driver. Please see the error message from Jenkins Console output: Started by user

Kubernetes mount.nfs: access denied by server while mounting

岁酱吖の 提交于 2019-12-01 06:59:51
I have a kubernetes cluster that is running in out network and have setup an NFS server on another machine in the same network. I am able to ssh to any of the nodes in the cluster and mount from the server by running sudo mount -t nfs 10.17.10.190:/export/test /mnt but whenever my test pod tries to use an nfs persistent volume that points at that server it fails with this message: Events: FirstSeen LastSeen Count From SubObjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 19s 19s 1 default-scheduler Normal Scheduled Successfully assigned nfs-web

nfs文件系统

点点圈 提交于 2019-12-01 05:04:35
一、什么是文件系统?   文件系统是对一个存储设备上的数据和元数据进行组织的一种机制。文件系统是在一个磁盘(包括光盘、软盘、闪盘及其它存储设备)或分区上组织文件方式方法,常见文件系统如ext2、ext3、ext4、NTFS或fat、fat32等。文件系统格式组织存储文件或数据的方法,目的是易于查询和存取数据, 如果磁盘上没有文件系统也就无法存储数据了,因此,磁盘分区后能够使用之前必须建立对应的文件系统才行(类似买了电脑不装系统就无法使用)。   (1) 文件系统是对一个存储设备上的数据和元数据进行组织的一种机制;   (2)分区必须格式化,创建的文件系统才能存放数据,不同的分区只能有一种文件系统。   (3)Linux下常见文件系统 ext2、ext3、ext4 、zfs、 xfs 、和Reiserfs      Windows下常见文件系统NTFS、FAT31。 二、NFS网络文件共享服务: 1、NFS概述:   NFS是第一个构建于IP协议之上的现代网络文件系统;   NFS 是 Network File System 的缩写,它的主要功能是通过网络让不同的主机系统之间可以彼此共享文件或目录。NFS客户端(一般为应用服务器,如web)可以通过挂载(mount)的方式将NFS服务器共享的数据文件目录挂载到NFS客户端本地系统中(就是某一个挂载点下)。从NFS客户端的机器本地上看

openstack 在线迁移(live-migration)的配置

南楼画角 提交于 2019-12-01 03:52:09
今天花了大概一天白天的时间把openstack的在线迁移(live-migration)配好了,效果非常不错,在迁移过程中基本没有出现暂停的过程。下面是我的配置过程,有问题的大家指出一下,一起学习学习。 首先得说明一下我的openstack集群环境,我的部署架构是参照一个国外的人的部署的架构部署的,不熟过程在我的上一篇blog上。以下是节点的IP地址: controler(ubuntu 12.10): 192.168.100.51(与集群中其他的节点通信),10.6.12.60(外部可访问的地址) compute0 (ubuntu 12.10) : 192.168.100.56 compute3 (ubuntu 12.10) : 192.168.100.57 network (ubuntu 12.10) : 192.168.100.52 注意:确保每个节点都能用名称解析,即hosts文件中要有对应的IP与服务器名 1.安装NFS服务器 由于迁移(migrate)需要用到共享存储,所以我们必须得配置一个能够被compute节点共同使用的存储服务。共享存储服务有很多种,也不只限于NFS服务。但是考虑到NFS的方便性,我采用了NFS。我选择在controler节点上配置一个NFS服务,用apt-get安装: apt-get install nfs-kernel-server 安装后