pv回收
学习cloudman中的k8s 152课,创建pod时,需要在k8s-host2 中挂着到在k8s-master 中/nfs中创建的挂载目录,结果提示没有/nfs/pv1
root@k8s-master:/nfs# kubectl describe pod mypod1
Name: mypod1
Namespace: default
Priority: 0
PriorityClassName: <none>
Node: k8s-host2/10.11.124.102
Start Time: Tue, 05 Mar 2019 13:23:40 +0800
Labels: <none>
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"name":"mypod1","namespace":"default"},"spec":{"co
Status: Pending
IP:
Containers:
mypod1:
Container ID:
Image: busybox
Image ID:
Port: <none>
Host Port: <none>
Args:
/bin/sh
-c
sleep 30000
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment: <none>
Mounts:
/mydata from mydata (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-9h9sl (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
mydata:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: mypvc1
ReadOnly: false
default-token-9h9sl:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-9h9sl
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 26m default-scheduler Successfully assigned default/mypod1 to k8s-host2
Warning FailedMount 26m kubelet, k8s-host2 MountVolume.SetUp failed for volume "mypv1" : mount failed: exit status 32
Mounting command: systemd-run
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/d62d6952-3f06-11e9-b448-52540015401d/volumes/kkubernetes.io~nfs/mypv1
Output: Running scope as unit run-rfad22384ff4140fea68f814c5b6aca49.scope.
mount: wrong fs type, bad option, bad superblock on 10.11.124.100:/nfs/pv1,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so.
Warning FailedMount 26m kubelet, k8s-host2 MountVolume.SetUp failed for volume "mypv1" : mount failed: exit status 32
Mounting command: systemd-run
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/d62d6952-3f06-11e9-b448-52540015401d/volumes/kkubernetes.io~nfs/mypv1
Output: Running scope as unit run-r9090a847cb034a65ba542db91fcb3319.scope.
mount: wrong fs type, bad option, bad superblock on 10.11.124.100:/nfs/pv1,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
#################################################
下面是安装好nfs-common 后
root@k8s-master:/home/k8s# kubectl apply -f pod1.yml
pod/mypod1 configured
root@k8s-master:/home/k8s# kubectl delete -f pod1.yml
pod "mypod1" deleted
root@k8s-master:/home/k8s# kubectl get pods
NAME READY STATUS RESTARTS AGE
producer-consumer 2/2 Running 4 21h
root@k8s-master:/home/k8s# kubectl apply -f pod1.yml
pod/mypod1 created
root@k8s-master:/home/k8s# kubectl get pods
NAME READY STATUS RESTARTS AGE
mypod1 0/1 ContainerCreating 0 2s
producer-consumer 2/2 Running 4 21h
root@k8s-master:/home/k8s# kubectl get pods
NAME READY STATUS RESTARTS AGE
mypod1 0/1 ContainerCreating 0 5s
producer-consumer 2/2 Running 4 21h
root@k8s-master:/home/k8s# kubectl get pods
NAME READY STATUS RESTARTS AGE
mypod1 1/1 Running 0 15s
producer-consumer 2/2 Running 4 21h
root@k8s-master:/home/k8s# kubectl describe pod mypod1
Name: mypod1
Namespace: default
Priority: 0
PriorityClassName: <none>
Node: k8s-host2/10.11.124.102
Start Time: Tue, 05 Mar 2019 14:19:10 +0800
Labels: <none>
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"name":"mypod1","namespace":"default"},"spec":{"containers":[{"args":["/bin/s...
Status: Running
IP: 10.244.1.60
Containers:
mypod1:
Container ID: docker://a99be41e69135a5b52091cfd8a71a0d7bc03893ba805428414055d65696e91ce
Image: busybox
Image ID: docker-pullable://busybox@sha256:061ca9704a714ee3e8b80523ec720c64f6209ad3f97c0ff7cb9ec7d19f15149f
Port: <none>
Host Port: <none>
Args:
/bin/sh
-c
sleep 30000
State: Running
Started: Tue, 05 Mar 2019 14:19:15 +0800
Ready: True
Restart Count: 0
Environment: <none>
Mounts:
/mydata from mydata (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-9h9sl (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
mydata:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: mypvc1
ReadOnly: false
default-token-9h9sl:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-9h9sl
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 29s default-scheduler Successfully assigned default/mypod1 to k8s-host2
Normal Pulling 29s kubelet, k8s-host2 pulling image "busybox"
Normal Pulled 24s kubelet, k8s-host2 Successfully pulled image "busybox"
Normal Created 24s kubelet, k8s-host2 Created container
Normal Started 24s kubelet, k8s-host2 Started container
root@k8s-master:/home/k8s#
##############################################################
以下是百度的解决方案
在linux中利用nfs挂载硬盘时发现提示wrong fs type, bad option, bad superblock错误了,在网上搜索了一下说是没有安装 mount.nfs了,我们只要安装mount.nfs就不会有wrong fs type, bad option, bad superblock错误提示了哦。
今天碰到一个nfs挂载错误的问题,错误提示如下:
mount: wrong fs type, bad option, bad superblock on 125.64.41.244:/data/img,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
根据错误提示,查看/sbin/mount.<type>文件,果然发现没有/sbin/mount.nfs的文件,安装nfs-utils即可
解决方法:
代码如下 复制代码
apt-get install nfs-common
或者
yum install nfs-utils
安装之后,/sbin/下面多了两个mount文件,分别是mount.nfs和mount.nfs4:
代码如下 复制代码
[root@web data]# ll /sbin/mount*
-rwsr-xr-x. 1 root root 123776 11月 22 2013 /sbin/mount.nfs
lrwxrwxrwx. 1 root root 9 6月 9 13:41 /sbin/mount.nfs4 -> mount.nfs
-rwxr-xr-x. 1 root root 1338 2月 22 2013 /sbin/mount.tmpfs
pv回收的更多相关文章
- Kubernetes集群PV和PVC详解
Kubernetes集群高级存储资源PV及PVC 文章目录 Kubernetes集群高级存储资源PV及PVC 1.高级存储PV和PVC概念部分 2.PV和PVC资源的生命周期 3.PV资源介绍与案例配 ...
- Kubernetes 存储系统 Storage 介绍:PV,PVC,SC
要求:先了解数据docker容器中数据卷的挂载等知识 参考网址: https://www.cnblogs.com/sanduzxcvbnm/p/13176938.html https://www.cn ...
- Kubernetes (1.6) 中的存储类及其动态供给
原文地址:http://blog.fleeto.us/translation/dynamic-provisioning-and-storage-classes-kubernetes-0?utm_sou ...
- 利用nfs-client-provisioner动态提供Kubernetes后端存储卷
原文:https://www.kubernetes.org.cn/3894.html 利用NFS client provisioner动态提供Kubernetes后端存储卷 本文翻译自nfs-clie ...
- k8s之volume
pause容器为基础架构容器,每一个节点都有一个pause镜像, 为每一个pod提供底层基础支撑设备,所有pod中容器会共享此容器的网络空间,存储卷也是 还可使用csi,存储插件. 使用存储卷步骤1. ...
- k8s 笔记
一. 解决pod间依赖性 1.手动的采用不同顺序启动不同pod 2.定义restart policy(默认为alway,我们可以定义当某条件不满足时就一直重启,当满足条件是才启动容器) 3.如果对于强 ...
- kubernetes之NFS动态提供Kubernetes后端存储卷
StorageClass作为对存储资源的抽象定义, 对用户设置的NFS申请屏蔽后端存储的细节, 一方面减少了用户对于存储资源细节的关注, 另一方面减轻了管理员手工管理pv的工作, 由系统自动完成pv的 ...
- 容器编排系统K8s之StatefulSet控制器
前文我们聊到了k8s的configmap和secret资源的说明和相关使用示例,回顾请参考:https://www.cnblogs.com/qiuhom-1874/p/14194944.html:今天 ...
- k8s使用ceph的rbd作后端存储
k8s使用rbd作后端存储 k8s里的存储方式主要有三种.分别是volume.persistent volumes和dynamic volume provisioning. volume: 就是直接挂 ...
随机推荐
- 洛谷P3178[HAOI]2015 树上操作
题目 树剖裸题,这个题更可以深刻的理解树剖中把树上的节点转换为区间的思想. 要注意在区间上连续的节点,一定是在一棵子树中. #include <bits/stdc++.h> #define ...
- ICEM-轴
https://yunpan.cn/cuy98EwwXvYkb 访问密码 0897
- 大数据技术之kettle(2)——练习三个基本操作
一.同一数据库两表数据关联更新 实现效果:把stu1的数据按id同步到stu2,stu2有相同id则更新数据 步骤: 1.在mysql中创建两张表: mysql>create database ...
- lisp语法分析与执行分离
lisp语法分析与执行分离 <sicp>4.1.7节读书笔记 这节中将书中之前实现的解释器做了改进,将语法分析于执行分离.这样做能提高很多效率,比如我们需定义一个过程,然后执行该过程多次. ...
- appium 多线程还是多进程(转)
https://www.cnblogs.com/zouzou-busy/p/11440175.html 在前面我们都是使用一个机器进行测试,在做app自动化的时候,我们要测不同的机型,也就是兼容性测试 ...
- 苹果IPhone真机开发调试
需要 在苹果开发网站 加入真机的UDID, 并在Profile中勾选该手机
- 完美解决: org.apache.ibatis.binding.BindingException Invalid bound statement (not found)
异常描述: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 原因: springboot ...
- Spring Boot核心原理
Spring Boot核心原理 spring-boot-starter-xxx 方便开发和配置 1.没有depoy setup tomcat 2.xml文件里面的没有没有了 @SpringBootA ...
- Mysql| 组合where子句过滤数据(AND,OR,IN,NOT)
ysql 允许使用多个where子句,组合where子句允许使用两种方式使用:AND 和OR子句的方式使用.数据库中的操作符号:AND , OR , IN , NOT. AND:SELECT * FR ...
- Oracle 查询表分区相关信息
Oracle 查询表分区相关信息 --表分区 --1,分区表信息 -- (1)显示数据库所有分区表的信息 select * from DBA_PART_TABLES a where a.owner=u ...