当前位置:网站首页>[nfs failed to mount problem] mount nfs: access denied by server while mounting localhost:/data/dev/mysql
[nfs failed to mount problem] mount nfs: access denied by server while mounting localhost:/data/dev/mysql
2022-06-22 19:38:00 【Dream_ it_ possible!】
centos 7 Use nfs An error occurred while mounting the data volume :localhost kubelet: mount.nfs: access denied by server while mounting localhost:/data/dev/mysql
perform Create when ,mysql The container has been in creating state ,mysql-dev-nfs.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: mysql-dev
labels:
name: mysql-dev
spec:
replicas: 1
selector:
name: mysql-dev
template:
metadata:
labels:
name: mysql-dev
spec:
containers:
- name: mysql
image: nacos/nacos-mysql:5.7
ports:
- containerPort: 3307
volumeMounts:
- name: mysql-data
mountPath: /var/lib/mysql
env:
- name: MYSQL_ROOT_PASSWORD
value: "root"
- name: MYSQL_DATABASE
value: "nacos_devtest"
- name: MYSQL_USER
value: "nacos"
- name: MYSQL_PASSWORD
value: "nacos"
volumes:
- name: mysql-data
nfs:
server: localhost
path: /data/dev/mysql
---
apiVersion: v1
kind: Service
metadata:
name: mysql-dev
labels:
name: mysql-dev
spec:
ports:
- port: 3307
targetPort: 3307
nodePort: 30070
selector:
name: mysql-dev
type: NodePort I want to put mysql-data Mount to this machine /data/dev/mysql Under the table of contents , Use command cat /var/log/messages | grep mount see mount Related logs , It keeps reporting errors access denied, The following is the log after solving the problem .
resolvent :
1. Check whether the system is equipped with nfs service, You can use systemctl status <service_name> see .

2. Set the mounted directory to insecure attribute , Carry out orders
vim /etc/exportsAdd the following , Said to /data Give permissions and permissions to the directory insecure.
/data *(insecure,rw,async,no_root_squash)
After editing , preservation , restart nfs service.

systemctl restart nfs

3. Re execution kubectl apply -f service command , see pods Is it working .

边栏推荐
- 200亿VS 50亿,“脱水”小红书,到底值多钱?
- session机制详解以及session的相关应用
- [suggestions collection] common usage scenarios of message queue
- STM32控制矩阵按键,HAL库,cubeMX配置
- A homekit enabled camera? Zhiting IPC camera IC1 unpacking experience
- Flutter series - build a flutter development environment
- canvas给图片画框框
- 一款支持HomeKit的摄像头?智汀 IPC摄像头IC1开箱体验
- 数组对象实现一 一对比(索引和id相同的保留原数据,原数组没有的数据从默认列表加进去)
- 将一维数据(序列)转化为二维数据(图像)的方法汇总GAFS, MTF, Recurrence plot,STFT
猜你喜欢
组合学笔记(五)分配格中的链

Iplook 5gc successfully connected with CICA international CHF (billing function)
![[nfs无法挂载问题] mount.nfs: access denied by server while mounting localhost:/data/dev/mysql](/img/15/cbb95ec823cdde5fb8f032dc45cfc7.png)
[nfs无法挂载问题] mount.nfs: access denied by server while mounting localhost:/data/dev/mysql

Paopao Mart: empty souls need stories

Cluster, distributed and microservice concepts and differences

维智科技亮相西部数博会,时空AI技术获高度认可

200亿VS 50亿,“脱水”小红书,到底值多钱?

20billion vs 5billion, how much is the "dehydration" little red book worth?

Weizhi technology appeared in the Western Digital Expo, and the space-time AI technology was highly recognized

Digital enabling machinery manufacturing industry, supply chain collaborative management system solution helps enterprises upgrade their supply chain
随机推荐
STM32控制矩阵按键,HAL库,cubeMX配置
有效的括号
Flutter series - build a flutter development environment
Service实战:使用Service完成一个下载任务
Wavelet transform DB4 for four layer decomposition and signal reconstruction matlab analysis and C language implementation
C#,入门教程——关于函数参数ref的一点知识与源程序
20billion vs 5billion, how much is the "dehydration" little red book worth?
机械设备行业数字化供应链集采平台解决方案:优化资源配置,实现降本增效
Message Oriented Middleware (I) MQ explanation and comparison of four MQS
Iplook, as a member of o-ran alliance, will jointly promote the development of 5g industry
同花顺好用么?手机开户安全么?
Programmer's tool encyclopedia [continuous update]
Experiment 7 trigger
贪心之区间问题(2)
什么?HomeKit、米家、Aqara等生态也能通过智汀与天猫精灵生态联动?
Shell programming specification and variables
小波变换db4进行四层分解及其信号重构—matlab分析及C语言实现
贪心之分配问题(1)
同花顺难开户么?网上开户安全么?
组合学笔记(五)分配格中的链