挂载nfs提示:mount.nfs: access denied by server while mounting...
出现此类错误原因大致为:
- 权限问题
- 防火墙机制问题
- 共享配置文件问题
搭建好nfs服务后,在client端进行挂载时,提示:
[root@web1 media]# mount -t nfs 192.168.0.124:/server/tools/repo /media/centos/
mount.nfs: access denied by server while mounting 192.168.0.124:/server/tools/repo
查看了一下client端是否被占用了:
[root@web1 media]# mount -t nfs 192.168.0.124:/server/tools/repo /media/centos/
mount.nfs: access denied by server while mounting 192.168.0.124:/server/tools/repo
[root@web1 media]# mount
/dev/sda3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=,mode=)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
发现并没有,然并卵。
接着就上server端查看/etc/exports配置文件:
[root@fenfa scripts]# cat /etc/exports
exporting 192.168..*:/server/tools/repo
exporting 192.168..*:/data
把192.168.0.24的/server/tools/repo共享给同一个网段的所有服务器,把IP格式规范为192.168.0.0/24或192.168.0.0/255.255.255.0
[root@fenfa scripts]# vim /etc/exports
[root@fenfa scripts]# exportfs -rv
exporting 192.168.0.0/:/server/tools/repo
exporting 192.168.0.0/:/data
[root@fenfa scripts]# showmount -e 127.0.0.1
Export list for 127.0.0.1:
/server/tools/repo 192.168.0.0/
/data 192.168.0.0/
我们再从client端上从新挂载:
[root@web1 media]# mount -t nfs 192.168.0.124:/server/tools/repo /media/centos/
[root@web1 media]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 19G .8G 16G % /
tmpfs 491M 491M % /dev/shm
/dev/sda1 194M 29M 155M % /boot
192.168.0.124:/server/tools/repo 19G .7G 11G % /media/centos
is ok!
如果卸载的时候提示: umount:/mnt:device is busy;解决方法:需要退出挂载目录再进行卸载,或者是否NFS server宕机了
[root@web1 nginx-1.6.]# umount -t nfs 192.168.0.124:/server/tools/rep /media/centos/
umount: 192.168.0.124:/server/tools/rep: not found
umount.nfs: /media/centos: device is busy
[root@web1 nginx-1.6.]# umount -t nfs 192.168.0.124:/server/tools/rep /media/centos/
[root@web1 nginx-1.6.]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 19G .9G 16G % /
tmpfs 491M 491M % /dev/shm
/dev/sda1 194M 29M 155M % /boot
需要强制卸载:mount –lf /mnt
此命令也可以:fuser –km /mnt 不建议用
挂载nfs提示:mount.nfs: access denied by server while mounting...的更多相关文章
- mount.nfs: access denied by server while mounting localhost:/home/xuwq/minilinux/system
在执行命令如下: mount -t nfs localhost:/home/xuwq/minilinux/system /mnt 出现的错误: mount.nfs: access denied by ...
- OS + RedHat 6.3 x64 NFS / mount.nfs: access denied by server while mounting
s Linux mount/unmount命令(转) https://www.cnblogs.com/xd502djj/p/3809375.html 问题2:NFS配置项no_root_squash和 ...
- 解决mount.nfs: access denied by server while mounting错误
环境:oraclelinux6.7 以前在centos服务器上安装nfs.挂载NFS都没出现问题,今天在oraclelinux上安装后,在客户端mount的时候报mount.nfs: access d ...
- nfs mount 故障 mount.nfs: access denied by server while mounting 10.0.100.208:/backup_usb
生产环境: 服务端centos7.2,客户端:ubuntu16.04 挂载出现的故障: root@HDCtrl100:/mnt# mount -t nfs 10.0.100.208:/backup_u ...
- 解决mount.nfs: access denied by server while mounting
在linux下进行挂载时突然出现: mount.nfs: access denied by server while mounting 第一感觉是读取文件权限不够,准备去更改一下挂载点的权限,但又考 ...
- mount.nfs: access denied by server while mounting <SERVER IP>:<SERVER PATH>
root@hipchat:~# mount -t nfs 192.168.10.220:/hipchat/share /home/share/nfs mount.nfs: access denied ...
- Ubuntu 出现access denied by server while mounting
3516cv500板端nfst调试时如此配置 虚拟机: #vi /etc/exports 添加 /home/"待分享文件路径" *(rw,sync,no_root_squas ...
- nfs挂载出错:mount.nfs: access denied by server while mounting
这个问题就是服务器不允许客户端去挂载,那么修改服务端的权限 $ sudo vi /etc/hosts.deny 文本末添加 ### NFS DAEMONS portmap: ALL lockd: AL ...
- mount.nfs: access denied by server while mounting
在利用centos7系统搭建NFS服务时出现如下问题,百度后才解决 因为当时在服务器端vim /etc/exports 时, 我只写了 这一行 /home/wjs-nfs *(ro) (没想到偷懒出 ...
随机推荐
- git 只提交部分修改文件
1.git status //查看修改文件状态 2.git add //将想要提交的文件add到本地库 4.git status //查看修改文件状态 3.git commit //提交add到 ...
- MacOS Laravel 安装教程
一.到官网选择 Laravel 版本 根据个人的喜好选择安装的版本,我选择的是 5.8 https://laravel.com/docs/5.8/installation 以下是 Laravel 5. ...
- JS高级:面向对象解析
1 实例属性/方法 都是绑定在使用构造函数创建出来的对象p上; 最终使用的时候也是使用对象p来进行访问; function Person(name, age, doFunc) { this.name ...
- [LeetCode] 875. Koko Eating Bananas 可可吃香蕉
Koko loves to eat bananas. There are N piles of bananas, the i-th pile has piles[i] bananas. The g ...
- mac的brew安装tomcat以及idea设置
Tomcat安装 brew search tomat 有tomcat@7. tomcat@8. tomcat最新版本(即tomcat9)三个版本 brew install tomcat 启动tomca ...
- 【视频开发】四大图像库:OpenCV/FreeImage/CImg/CxImage
1.对OpenCV 的印象:功能十分的强大,而且支持目前先进的图像处理技术,体系十分完善,操作手册很详细,手册首先给大家补计算机视觉的知识,几乎涵盖了近10年内的主流算法: 然后将图像格式和矩阵运算, ...
- PHPExcel 中文使用手册详解 二
$objPHPExcel = new \PHPExcel(); //定义配置 $topNumber = 2;//表头有几行占用 $xlsTitle = iconv('utf-8', 'gb2312', ...
- Spring 框架的概述以及Spring中基于XML的IOC配置
Spring 框架的概述以及Spring中基于XML的IOC配置 一.简介 Spring的两大核心:IOC(DI)与AOP,IOC是反转控制,DI依赖注入 特点:轻量级.依赖注入.面向切面编程.容器. ...
- linux初识1
linux 操作系统 概念性的理解 1.Linux内置解释器bash 相当于pyhon解释器 2.Linux的内部大多是使用python去书写 云计算 1.只需要 花钱,买腾讯,阿里云服务器 2.专人 ...
- LVS(3种模式+10种调度算法)
一.LVS简介 LVS(Linux Virtual Server)即Linux虚拟服务器,是由章文嵩博士主导的开源负载均衡项目,目前LVS已经被集成到Linux内核模块中.该项目在Linux内核中实现 ...