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: 就是直接挂 ...
随机推荐
- mysql创建账号、授权、数据导出、导入
1.账号创建及授权 grant all privileges on *.* to 'yangxin'@'%' identified by 'yangxin123456' with grant opti ...
- 内核中通过进程PID获取进程的全部路径
目录 一丶简介 二丶原理 1.原理 2.代码实现. 一丶简介 我们遇到的Dos路径.如果想转化为NT路径(也就是 C:\xxxx)类似的格式 需要自己实现. 具体原理如下: 二丶原理 1.原理 1.使 ...
- word 新建一行文字不能左对齐
- Pytest权威教程27-Bash自动补全设置
目录 Bash自动补全设置 返回: Pytest权威教程 Bash自动补全设置 在Linux/Mac bash shell环境下,可以使用argcomplete对pytest命令进行自动补全.首先要安 ...
- PIT 编辑器编辑及协同架构说明
pit 项目使用 quill-delta 作为数据层存储文档内容数据,quill-delta 是一个基于 OT 算法的库,用 quill-delta 作为数据层,不仅能很好的保存文档数据,还可以方便的 ...
- 作业要求2018092609-2 选题 Scrum立会报告+燃尽图 05
此作业要求参见:https://edu.cnblogs.com/campus/nenu/2019fall/homework/8678 一.小组情况组长:贺敬文组员:彭思雨 王志文 位军营 杨萍队名:胜 ...
- Android分区解释
让我们从Android手机和平板电脑的标准内存分区列表开始.分区有:/boot/system/recovery/data/cache/misc 此外,有SD卡的分区./sdcard/sd-ext 请注 ...
- vue-router 利用url传递参数
vue-router 利用url传递参数 :冒号的形式传递参数 在路由配置文件里以:冒号的形式传递参数,这就是对参数的绑定. 1. 在配置文件里以冒号的形式设置参数.我们在/src/router/i ...
- SpringBoot整合Quartz和H2的例子
话不多说,直接上代码: pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xml ...
- eclipse自定义代码块折叠
1.下载插件 com.cb.eclipse.folding_1.0.6.jar 下载地址:http://files.cnblogs.com/haiq/代码折叠插件_com.cb.eclipse.fol ...