nfs

I got an error when starting mysql: Unable to lock ./ibdata1, error: 11

人走茶凉 提交于 2019-12-02 10:13:46
when removed the ibdata1 it worked, and I cant understand how it happened. I checked with ps and there was no mysql process. also permissions were ok. Is there a way to check the integrity of this file? this is one of the issue using NFS for MySQL , one quick solution can be found on http://onaxer.com/blog/blog/2010/06/01/innodb-unable-to-lock-ibdata1-error-37/ Did you restart mysql with the wrong user at some point? What were the permissions on the file and the directory it was in? I guess some other process is talking to this resource/file you don't have the right permissions on that file.

NFS

空扰寡人 提交于 2019-12-02 06:14:21
目录 1.nfs简介 1.1nfs特点 1.2使用nfs的好处 1.3nfs的体系组成 1.4nfs的应用场景 2.nfs工作机制 2.1PRC 2.2NIS 2.3nfs工作机制 3.exports文件的格式 4.nfs管理 5.实验 1.nfs简介 1.1nfs特点 NFS(Network File System)即网络文件系统,是FreeBSD支持的文件系统中的一种,它允许网络中的计算机之间通过TCP/IP网络共享资源 在NFS的应用中,本地NFS的客户端应用可以透明地读写位于远端NFS服务器上的文件,就像访问本地文件一样 nfs适用于Linux与Unix之间实现文件共享,不能实现Linux与Windows间的文件共享功能 nfs是运行在应用层的协议,其监听于2049/tcp和2049/udp套接字上 nfs服务只能基于IP进行认证,这也是它的缺点之一 1.2使用nfs的好处 节省本地存储空间,将常用的数据存放在一台NFS服务器上且可以通过网络访问,那么本地终端将可以减少自身存储空间的使用 用户不需要在网络中的每个机器上都建有Home目录,Home目录可以放在NFS服务器上且可以在网络上被访问使用 一些存储设备如软驱、CDROM和Zip(一种高储存密度的磁盘驱动器与磁盘)等都可以在网络上被别的机器使用。这可以减少整个网络上可移动介质设备的数量 1.3nfs的体系组成

搭建nfs服务器

瘦欲@ 提交于 2019-12-02 06:12:34
搭建nfs服务器 1.nfs简介 1.开放/nfs/shared目录,供所有用户查阅资料 1.安装nfs-utils,并开启rpcbind nfs-server 2.关闭防火墙 3.创建/nfs/shared目录 4.编辑文件/etc/exports,共享目录/nfs/shared并且允许所有客户端访问并且只有读的权限 5.用 exportfs -r读取/etc/exports文件中的设置,并使其立即生效,无需重启服务 6.在客户端上showmount -e 查看服务器上的共享目录 7.将服务器的共享目录挂载到本地的nfs目录里面 8.进入到nfs目录里就能看到服务器共享的资料了 2.开放/nfs/upload目录为172.16.12.0/24网段的数据上传目录,并将所有用户及所属的用户组都映射为nfs-upload,其UID与GID均为300 1.创建目录/nfs/upload 2.创建用户nfs-upload并且uid和gid都是300 3.编辑/etc/exports文件并且将目录/nfs/upload共享出来,让他只允许192.168.10.0/24网段访问并且所有用户及所属的用户组都映射为nfs-upload 4.用 exportfs -r读取/etc/exports文件中的设置,并使其立即生效,无需重启服务 5.在客户端上showmount -e 查看服务器上的共享目录

git shows random files changed on Mac NFS filesystem

家住魔仙堡 提交于 2019-12-02 05:46:33
问题 We have a strange problem here at work that I've been unable to figure out. We all use MacBooks with Snow Leopard on our desktops and we have a handful of Linux servers we also use remotely. Some of my team members put git repositories on an NFS filesystem that's shared between both the Mac's and the Linux servers so they don't have to think about sharing code between repositories in their personal workflow. This is where the strange starts, on the OSX machines git will randomly show some

Vagrant shared folder with rails server

爷,独闯天下 提交于 2019-12-02 04:06:43
问题 I'm running rails on a nfs shared folder in a vagrant box. While the server (thin/webrick) is running I'm editing files in my host. But I have to keep stopping and restarting the application server to see changes reflected in the webapp. Is this normal behaviour? 回答1: I go this issue on Vagrant box synchronising my folder with NFS. I made a change in my application development configuration file ( config/environments/development.rb ), just adding this line config.reload_classes_only_on_change

Linux下创建NFS来实现共享文件

白昼怎懂夜的黑 提交于 2019-12-02 03:06:55
简介说明: 在项目生产环境我们经常需要实现文件共享,传统的常见方案是通过NFS,实现服务器之间共享某一块磁盘,通过网络传输将分散的文件集中存储在一块指定的共享磁盘,实现基本的文件共享。实现这种方案,分服务端和客户端,将服务端的磁盘mount到客户端指定目录下,在客户端操作就像操作本地磁盘一样。 服务端安装NFS步骤: Step 1:安装nfs和rpcbind程序 yum -y install nfs* Step 2:检测nfs与rpcbind是否安装 rpm -qa |grep nfs rpm -qa |grep rpcbind Step 3 :选择共享目录,并配置共享信息 共享目录:/BIG_DATA/EDW/ZYXF_EDW/PYTHON_APP vi /etc/exports /BIG_DATA/EDW/ZYXF_EDW/PYTHON_APP 10.94.21.0/255.255.255.0(rw,no_root_squash,no_all_squash,sync) Step 4 :开机自动启动和启动服务 chkconfig rpcbind on chkconfig nfs on service rpcbind start service nfs start Step 5 :查看是否共享成功 [root@cdh1 PYTHON_APP]# showmount -e

Linux不同机器文件挂载

喜夏-厌秋 提交于 2019-12-02 02:45:52
由于此前发布项目应用时,需要对两台文件服务器进行文件挂载,所以才实际第一次接触到这个名词,但由于一直以来自己没有真正的去操作过,只是停留在一些理论层次,所以今天记录一下这个实现过程,以备后用。 使用设备:Centos7 虚拟机两台,一台作为服务端,一台作为客户端。 安装SNF服务 1、由于在进行文件挂载时需要使用 SNF 服务(让不同的机器、不同的操作系统、可以彼此分享个别文件),所以我们需要进行检查自己的虚拟机是否开启或安装此服务。 service nfs status 服务开始状态,如图: 若结果显示 nfs: unrecognizedservice 说明服务没有开始。 2、检查是否安装 SNF rpm -qa | grep nfs rpm -qa | grep rpcbind 结果如图: 若没有安装,使用 yum -y install nfs-utils rpcbind 进行安装。 注:此步骤限于centos6.X之前的系统,若版本为6.x之后则可跳过。 检查是否安装 portmap 若显示nfs: unrecognizedservice 则需要安装portmap,使用yum install portmap 服务端配置 在NFS服务端上创建共享目录/sharefile/data并设置权限 mkdir -p /sharefile/data chmod 666

git shows random files changed on Mac NFS filesystem

我怕爱的太早我们不能终老 提交于 2019-12-02 02:27:12
We have a strange problem here at work that I've been unable to figure out. We all use MacBooks with Snow Leopard on our desktops and we have a handful of Linux servers we also use remotely. Some of my team members put git repositories on an NFS filesystem that's shared between both the Mac's and the Linux servers so they don't have to think about sharing code between repositories in their personal workflow. This is where the strange starts, on the OSX machines git will randomly show some files out of date in status when you try to merge or switch branches etc. If you run git status no files

Is gc.log writing asynchronous? safe to put gc.log on NFS mount?

送分小仙女□ 提交于 2019-12-02 00:33:08
I heard multiple times that putting gc.log on NFS volume is terrible idea because it might cause gc pauses to be longer. Is it still the case with current jdk (8u25)? So I checked - it's not asynchronous and uses regular fopen/fwrite. Relevant code from jdk8u : gcLogFileStream::gcLogFileStream(const char* file_name) { _cur_file_num = 0; _bytes_written = 0L; _file_name = make_log_name(file_name, NULL); // gc log file rotation if (UseGCLogFileRotation && NumberOfGCLogFiles > 1) { char tempbuf[FILENAMEBUFLEN]; jio_snprintf(tempbuf, sizeof(tempbuf), "%s.%d" CURRENTAPPX, _file_name, _cur_file_num);

Vagrant shared folder with rails server

左心房为你撑大大i 提交于 2019-12-02 00:03:35
I'm running rails on a nfs shared folder in a vagrant box. While the server (thin/webrick) is running I'm editing files in my host. But I have to keep stopping and restarting the application server to see changes reflected in the webapp. Is this normal behaviour? I go this issue on Vagrant box synchronising my folder with NFS . I made a change in my application development configuration file ( config/environments/development.rb ), just adding this line config.reload_classes_only_on_change = false and it works. Ensure that you have this config.cache_classes = false as well, I had it by default