1. 程式人生 > >搭建NFS服務 ,並在Kubernetes掛載NFS

搭建NFS服務 ,並在Kubernetes掛載NFS

[[email protected] log]# kubectl describe pod prometheus-544bf54848-b97rn --namespace=kube-system
Name:           prometheus-544bf54848-b97rn
Namespace:      kube-system
Node:           szy-k8s-node1/10.10.31.203
Start Time:     Tue, 26 Jun 2018 17:05:08 +0800
Labels:         app=prometheus
                pod-template-hash=1006910404
Annotations: <none> Status: Pending IP: Controlled By: ReplicaSet/prometheus-544bf54848 Containers: prometheus: Container ID: Image: prom/prometheus:latest Image ID: Port: 9090/TCP Host Port: 0/TCP State: Waiting Reason: ContainerCreating Ready: False
Restart Count: 0 Environment: <none> Mounts: /etc/prometheus/prometheus.yml from prometheus-conf-volume (rw) /etc/prometheus/rules from prometheus-rules-volume (rw) /prometheus from prometheus-data-volume (rw) /var/run/secrets/kubernetes.io/serviceaccount from prometheus-token-6
lmsv (ro) Conditions: Type Status Initialized True Ready False PodScheduled True Volumes: prometheus-data-volume: Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace) ClaimName: prometheus-data-pvc ReadOnly: false prometheus-conf-volume: Type: ConfigMap (a volume populated by a ConfigMap) Name: prometheus-conf Optional: false prometheus-rules-volume: Type: ConfigMap (a volume populated by a ConfigMap) Name: prometheus-rules Optional: false prometheus-token-6lmsv: Type: Secret (a volume populated by a Secret) SecretName: prometheus-token-6lmsv Optional: false QoS Class: BestEffort Node-Selectors: <none> Tolerations: node-role.kubernetes.io/master:NoSchedule node.kubernetes.io/not-ready:NoExecute for 300s node.kubernetes.io/unreachable:NoExecute for 300s Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedMount 30m (x348 over 16h) kubelet, szy-k8s-node1 Unable to mount volumes for pod "prometheus-544bf54848-b97rn_kube-system(068ba024-7920-11e8-89d1-00505681317e)": timeout expired waiting for volumes to attach or mount for pod "kube-system"/"prometheus-544bf54848-b97rn". list of unmounted volumes=[prometheus-data-volume]. list of unattached volumes=[prometheus-data-volume prometheus-conf-volume prometheus-rules-volume prometheus-token-6lmsv] Warning FailedMount 36s (x573 over 16h) kubelet, szy-k8s-node1 (combined from similar events): MountVolume.SetUp failed for volume "prometheus-data-pv" : mount failed: exit status 32 Mounting command: systemd-run Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/068ba024-7920-11e8-89d1-00505681317e/volumes/kubernetes.io~nfs/prometheus-data-pv --scope -- mount -t nfs 10.10.31.202:/nfs/prometheus/data /var/lib/kubelet/pods/068ba024-7920-11e8-89d1-00505681317e/volumes/kubernetes.io~nfs/prometheus-data-pv Output: Running scope as unit run-26056.scope. mount.nfs: requested NFS version or transport protocol is not supported

解決方法:搭建NFS服務

#在master安裝
[root@szy-k8s-master /]# yum install -y nfs-utils rpcbind
#在每個node安裝
[root@szy-k8s-node1 /]# yum install -y nfs-utils 
#在每個node安裝
[root@szy-k8s-node2 /]# yum install -y nfs-utils 

配置:

#NFS服務的配置檔案  /etc/exports。 這個檔案可能不會存在,需要新建
[root@szy-k8s-master /]# cat /etc/exports
/nfs/prometheus/data/ 10.10.31.0/24(rw,no_root_squash,no_all_squash,sync)
#exports中的配置的內容,需要建立下/nfs/prometheus/data/
[root@szy-k8s-master /]# mkdir -p  /nfs/prometheus/data/
#修改許可權
[root@szy-k8s-master /]# chmod -R 777 /nfs/prometheus/data/
#驗證配置的/nfs/prometheus/data/是否正確
[root@szy-k8s-master /]# exportfs -r
10.10.31.0/24:這個是執行訪問NFS的IP範圍,也就是10.10.31開頭的IP,24是掩碼長度。 根據自己的k8s主機網段設定。
(rw,no_root_squash,no_all_squash,sync):
可以設定的引數主要有以下這些:

rw:可讀寫的許可權;
ro:只讀的許可權;
no_root_squash:登入到NFS主機的使用者如果是root,該使用者即擁有root許可權;
root_squash:登入NFS主機的使用者如果是root,該使用者許可權將被限定為匿名使用者nobody;
all_squash:不管登陸NFS主機的使用者是何許可權都會被重新設定為匿名使用者nobody。
anonuid:將登入NFS主機的使用者都設定成指定的user id,此ID必須存在於/etc/passwd中。
anongid:同anonuid,但是變成group ID就是了!
sync:資料同步寫入儲存器中。
async:資料會先暫時存放在記憶體中,不會直接寫入硬碟。
insecure:允許從這臺機器過來的非授權訪問。

啟動服務:

[root@szy-k8s-master /]# systemctl start rpcbind
[root@szy-k8s-master /]# systemctl status rpcbind
● rpcbind.service - RPC bind service
   Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; disabled; vendor preset: enabled)
   Active: active (running) since Wed 2018-06-27 11:05:29 CST; 1h 51min ago
  Process: 4111 ExecStart=/sbin/rpcbind -w $RPCBIND_ARGS (code=exited, status=0/SUCCESS)
 Main PID: 4112 (rpcbind)
   Memory: 580.0K
   CGroup: /system.slice/rpcbind.service
           └─4112 /sbin/rpcbind -w

Jun 27 11:05:29 szy-k8s-master systemd[1]: Starting RPC bind service...
Jun 27 11:05:29 szy-k8s-master systemd[1]: Started RPC bind service.
[root@szy-k8s-master /]# systemctl start nfs
[root@szy-k8s-master /]# systemctl status nfs
● nfs-server.service - NFS server and services
   Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
   Active: active (exited) since Wed 2018-06-27 11:26:54 CST; 1h 30min ago
  Process: 11859 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
  Process: 11853 ExecStartPre=/bin/sh -c /bin/kill -HUP `cat /run/gssproxy.pid` (code=exited, status=0/SUCCESS)
  Process: 11851 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 11859 (code=exited, status=0/SUCCESS)
   Memory: 0B
   CGroup: /system.slice/nfs-server.service

Jun 27 11:26:54 szy-k8s-master systemd[1]: Starting NFS server and services...
Jun 27 11:26:54 szy-k8s-master systemd[1]: Started NFS server and services.

檢驗:

[root@szy-k8s-master /]# showmount -e 10.10.31.202
Export list for 10.10.31.202:
/nfs/prometheus/data 10.10.31.0/24
[root@szy-k8s-master /]# 
NFS客戶端的操作:
1、showmout命令對於NFS的操作和查錯有很大的幫助,所以我們先來看一下showmount的用法
showmout
-a :這個引數是一般在NFS SERVER上使用,是用來顯示已經mount上本機nfs目錄的cline機器。
-e :顯示指定的NFS SERVER上export出來的目錄。
2、mount nfs目錄的方法:
mount -t nfs hostname(orIP):/directory /mount/point 

再次檢視問題,已經是成功,可掛載了。

[[email protected] /]# kubectl describe pod prometheus-544bf54848-b97rn --namespace kube-system
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node-role.kubernetes.io/master:NoSchedule
                 node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason       Age                  From                    Message
  ----     ------       ----                 ----                    -------
  Warning  FailedMount  36m (x664 over 19h)  kubelet, szy-k8s-node1  (combined from similar events): MountVolume.SetUp failed for volume "prometheus-data-pv" : mount failed: exit status 32
Mounting command: systemd-run
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/068ba024-7920-11e8-89d1-00505681317e/volumes/kubernetes.io~nfs/prometheus-data-pv --scope -- mount -t nfs 10.10.31.202:/nfs/prometheus/data /var/lib/kubelet/pods/068ba024-7920-11e8-89d1-00505681317e/volumes/kubernetes.io~nfs/prometheus-data-pv
Output: Running scope as unit run-17572.scope.
mount.nfs: access denied by server while mounting 10.10.31.202:/nfs/prometheus/data
  Warning  FailedMount            20m (x412 over 19h)  kubelet, szy-k8s-node1  Unable to mount volumes for pod "prometheus-544bf54848-b97rn_kube-system(068ba024-7920-11e8-89d1-00505681317e)": timeout expired waiting for volumes to attach or mount for pod "kube-system"/"prometheus-544bf54848-b97rn". list of unmounted volumes=[prometheus-data-volume]. list of unattached volumes=[prometheus-data-volume prometheus-conf-volume prometheus-rules-volume prometheus-token-6lmsv]
  Normal   SuccessfulMountVolume  15m                  kubelet, szy-k8s-node1  MountVolume.SetUp succeeded for volume "prometheus-data-pv"
  Normal   Pulled                 10m                  kubelet, szy-k8s-node1  Successfully pulled image "prom/prometheus:latest"
[[email protected] /]# 
掛載NFS報access denied by server :

檢視日誌資訊cat /var/log/messages | grep mount
掛載NFS報access denied by server :
access denied by server while mounting 10.10.31.202:/nfs/grafana/data

[[email protected] monitor]# kubectl describe pod grafana-865bdd58bc-bbfrm --namespace kube-system
......
  Warning  FailedMount  47s (x3 over 5m)  kubelet, szy-k8s-node1  Unable to mount volumes for pod "grafana-865bdd58bc-bbfrm_kube-system(a0c7217e-79ca-11e8-89d1-00505681317e)": timeout expired waiting for volumes to attach or mount for pod "kube-system"/"grafana-865bdd58bc-bbfrm". list of unmounted volumes=[grafana-data-volume]. list of unattached volumes=[grafana-data-volume default-token-q8gkz]
  #檢視日誌資訊cat /var/log/messages | grep mount 
[[email protected] monitor]# cat /var/log/messages | grep mount                                   
Jun 22 17:18:18 localhost kernel: XFS (dm-0): Ending clean mount
Jun 22 17:18:20 localhost kernel: XFS (sda1): Ending clean mount
Jun 22 17:18:56 localhost dracut: *** Including module: usrmount ***
Jun 25 15:24:27 szy-k8s-master kernel: XFS (dm-0): Ending clean mount
Jun 25 15:24:28 szy-k8s-master systemd: Started Remount Root and Kernel File Systems.
Jun 25 15:24:29 szy-k8s-master kernel: XFS (sda1): Ending clean mount
Jun 25 15:24:47 szy-k8s-master systemd: Unmounting RPC Pipe File System...
Jun 25 15:25:01 szy-k8s-master kernel: XFS (dm-0): Ending clean mount
Jun 25 15:25:02 szy-k8s-master systemd: Started Remount Root and Kernel File Systems.
Jun 25 15:25:03 szy-k8s-master kernel: XFS (sda1): Ending clean mount
Jun 25 17:31:34 szy-k8s-master systemd: Started Kubernetes transient mount for /var/lib/kubelet/pods/8cd706bc-785a-11e8-87c1-00505681317e/volumes/kubernetes.io~secret/kube-proxy-token-hwpp2.
Jun 25 17:31:34 szy-k8s-master systemd: Starting Kubernetes transient mount for /var/lib/kubelet/pods/8cd706bc-785a-11e8-87c1-00505681317e/volumes/kubernetes.io~secret/kube-proxy-token-hwpp2.
Jun 25 17:37:41 szy-k8s-master systemd: Started Kubernetes transient mount for /var/lib/kubelet/pods/67f013fa-785b-11e8-87c1-00505681317e/volumes/kubernetes.io~secret/flannel-token-mth94.
Jun 25 17:37:41 szy-k8s-master systemd: Starting Kubernetes transient mount for /var/lib/kubelet/pods/67f013fa-785b-11e8-87c1-00505681317e/volumes/kubernetes.io~secret/flannel-token-mth94.
Jun 25 17:37:46 szy-k8s-master systemd: Started Kubernetes transient mount for /var/lib/kubelet/pods/8ca12ba6-785a-11e8-87c1-00505681317e/volumes/kubernetes.io~secret/kube-dns-token-dcl8h.
Jun 25 17:37:46 szy-k8s-master systemd: Starting Kubernetes transient mount for /var/lib/kubelet/pods/8ca12ba6-785a-11e8-87c1-00505681317e/volumes/kubernetes.io~secret/kube-dns-token-dcl8h.
Jun 25 17:49:46 szy-k8s-master systemd: Started Kubernetes transient mount for /var/lib/kubelet/pods/17f3830f-785d-11e8-89d1-00505681317e/volumes/kubernetes.io~secret/kube-proxy-token-j9tc9.
Jun 25 17:49:46 szy-k8s-master systemd: Starting Kubernetes transient mount for /var/lib/kubelet/pods/17f3830f-785d-11e8-89d1-00505681317e/volumes/kubernetes.io~secret/kube-proxy-token-j9tc9.
Jun 25 17:57:56 szy-k8s-master systemd: Started Kubernetes transient mount for /var/lib/kubelet/pods/3beff963-785e-11e8-89d1-00505681317e/volumes/kubernetes.io~secret/flannel-token-4r9f4.
Jun 25 17:57:56 szy-k8s-master systemd: Starting Kubernetes transient mount for /var/lib/kubelet/pods/3beff963-785e-11e8-89d1-00505681317e/volumes/kubernetes.io~secret/flannel-token-4r9f4.
Jun 25 17:58:05 szy-k8s-master systemd: Started Kubernetes transient mount for /var/lib/kubelet/pods/17db1f20-785d-11e8-89d1-00505681317e/volumes/kubernetes.io~secret/kube-dns-token-qt6ch.
Jun 25 17:58:05 szy-k8s-master systemd: Starting Kubernetes transient mount for /var/lib/kubelet/pods/17db1f20-785d-11e8-89d1-00505681317e/volumes/kubernetes.io~secret/kube-dns-token-qt6ch.
Jun 26 16:38:24 szy-k8s-master systemd: Started Kubernetes transient mount for /var/lib/kubelet/pods/4a420702-791c-11e8-89d1-00505681317e/volumes/kubernetes.io~secret/default-token-q8gkz.
Jun 26 16:38:24 szy-k8s-master systemd: Starting Kubernetes transient mount for /var/lib/kubelet/pods/4a420702-791c-11e8-89d1-00505681317e/volumes/kubernetes.io~secret/default-token-q8gkz.
Jun 27 11:26:54 szy-k8s-master rpc.mountd[11849]: Version 1.3.0 starting
Jun 27 11:27:00 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:29:02 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:31:05 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:33:07 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:35:09 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:37:11 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:39:13 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:41:17 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:43:19 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:45:21 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:47:23 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:49:25 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:51:28 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:53:30 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:55:32 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:57:34 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 11:59:36 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:01:38 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:03:41 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:05:43 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:07:45 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:09:47 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:11:49 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:13:51 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:15:54 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:17:56 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:19:58 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:22:00 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:24:02 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:26:04 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:28:06 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:30:09 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:32:11 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/): not exported
Jun 27 12:34:13 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/prometheus/data (/nfs/prometheus/data): unmatched host
Jun 27 13:26:22 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported
Jun 27 13:26:23 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported
Jun 27 13:26:24 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported
Jun 27 13:26:26 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported
Jun 27 13:26:31 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported
Jun 27 13:26:39 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported
Jun 27 13:26:55 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported
Jun 27 13:27:27 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported
Jun 27 13:28:31 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported
Jun 27 13:30:33 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported
Jun 27 13:32:35 szy-k8s-master rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported

發現問題:rpc.mountd[11849]: refused mount request from 10.10.31.203 for /nfs/grafana/data (/): not exported.
解決問題:

相關推薦

搭建NFS服務 ,Kubernetes掛載NFS

[[email protected] log]# kubectl describe pod prometheus-544bf54848-b97rn --namespace=kube-system Name: prometheus-5

linux搭建svn服務手動同步程式碼到web目錄和自動更新

1.安裝svn服務端 yum -y install subversion 2.檢視安裝路徑等資訊 rpm -ql subversion 3.檢視svn幫助資訊 svn help 4.建立svn版本庫目錄(這是個大庫,裡面用svnadmin建立的才是各個專案的庫) mkdir /home/svnD

Vultr搭建CentOS服務使用銳速加速圖文《僅供學習使用》

<article> Vultr搭建CentOS服務並使用銳速加速圖文《僅供學習使用》 準備工作 開始配置 最後一步 準備工作 註冊Vultr賬號; 連結: Vultr官網 (如果在註冊過程中發現網站打不開,可以試試切換手

0037-如何在Windows Server2008搭建DNS服務配置泛域名解析

空間 users 選擇 compute ros 輸入 1.0 cor dha 溫馨提示:要看高清無碼套圖,請使用手機打開並單擊圖片放大查看。 1.文檔編寫目的 有了DNS服務,對於一個CDH集群的所有節點的hostname和ip,您就再也不需要手動維護各個節點的host

一鍵指令碼搭建SS/搭建SSR服務開啟BBR加速

一鍵搭建 VPN shadowsocks/搭建shadowsocksR的shell指令碼,一鍵指令碼適用Vultr上的和搬瓦工所有機型(CentOS、Ubuntu、D

windows下搭建nginx服務實現基於埠與路徑轉發

windows下搭建nginx nginx下載 nginx使用 nginx不能通過雙擊nginx.exe啟動,需要在cmd命令列中通過命令啟動。 啟動cmd命令列,進入nginx所在路徑 啟動命

222. window下面搭建zookeeper服務 使用客戶端訪問

0.參考: 服務端: https://www.cnblogs.com/xiohao/p/9717364.html 客戶端:

nfs服務器的搭建掛載使用

nfs mount nfs掛載 實驗環境:centos7.3服務器: JAMF 172.16.22.247客戶端: zabbix 172.16.22.233安裝包:服務器: yum -y install rpcbind.x86_64 nfs-utils.x86_64客戶端

在linux下通過nfs搭建檔案伺服器,實現掛載

今天做不成的事,明天也不會做好。 同學們,我們今天來學習在linux下搭建nfs檔案伺服器,並在linux和windows下進行掛載。最開始,專案的部署是和檔案放在一起的,後來,隨著訪問的人數增多,就需要把檔案單獨拿出來放到一個伺服器,這樣能

搭建NFS服務

centos之nfs簡介 NFS 是Network File System的縮寫,即網絡文件系統。一種使用於分散式文件系統的協定。功能是通過網絡讓不同的機器、不同的操作系統能夠彼此分享個別的數據讓應用程序在客戶端通過網絡訪問位於服務器磁盤中的數據,是在類Unix系統間實現磁盤文件共享的一種方法。NFS 的基

Centos6.4搭建NFS 服務器實例(四)

centos 6.x nfs nfs.rpcbind exportfs Centos6.4搭建NFS 服務器實例:服務器系統角色IPCentOS-64-121-server1NFS服務器端192.168.1.121CentOS-64-129-clientNFS客戶端192.168.1.129 共享

Linux下NFS服務器的搭建與配置

linux nfs 一.系統環境# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core)二.安裝NFS服務1、查看系統是否已安裝NFSrpm -qa | grep nfs rpm -qa | grep rpcbind2、安裝NFS

搭建FTP/NFS服務(vsftpd基於虛擬用戶的訪問形式)

nfs ftp vsftpd mysql題目:搭建一套文件vsftp文件共享服務,共享目錄為/ftproot,要求:(描述完整的過程)1)基於虛擬用戶的訪問形式;2)匿名不允許上傳;3)禁錮所有的用戶於其家目錄當中;4)限制最大並發連接數為200;5)匿名用戶的最大傳輸速率512KB/s;6)虛擬用戶的賬號存

搭建nfs共享存儲服務之一nfs服務搭建

linuxNFS相當於房源,RPC相當於中介。nfs-utils: NFS服務的主程序,包括rpc.nfsd、rpc.mountd這兩個daemon和相關文件說明,以及執行命令文件等。rpcbind: centos6.x下面RPC的主程序。NFS可以視為一個RPC程序,在啟動任何一個RPC程序之前,需要做

搭建nfs共享存儲服務之二nfs服務端配置語法及配置實戰詳解

linux1.1.NFS服務端配置文件路徑為: /etc/exports,並且默認為空,需要用戶自行配置。/etc/exports文件配置格式為:NFS共享的目錄 NFS客戶端地址1(參數1,參數2...)客戶端地址2(參數1,參數2)1.NFS共享的目錄:為NFS服務端要共享的實際目錄,要用絕對路徑,如(/

centos配置NFS服務和autofs自動掛載服務

共享 nfs autofs NFS:Network File System網絡文件系統,基於內核的文件系統。Sun公司開發,通過使用NFS,用戶和程序可以像訪問本地文件一樣訪問遠端系統上的文件,基於RPC(Remote Procedure Call Protocol遠程過程調用)實現。RPC采用C

NFS服務安裝及自動掛載(一)

nfs autofs 網絡文件系統 環境:server: xuexi.com(rhel6.5)client: study.com(rhel6.5)NFS:Network File System即網絡文件系統,NFS允許一個系統在網絡上與他人共享目錄和文件,通過使用NFS用戶和程序像訪問

vnx通過iscsi連接esxi主機,掛載nfs和block

iscsi vm主要步驟:1) vnx上創建一個nas folder,這個nas裏面有一個放了一個vm文件夾2) esxi上掛載nfs3) vnx上創建block pool與lun4) vnx上設置iscsi連接-> 設置iscsi的port以及連接vcenter5)venter上設置iscsi連接-&

NFS服務搭建

nfs服務1.簡介:NFS 是Network File System的縮寫,即網絡文件系統。一種使用於分散式文件系統的協定,由Sun公司開發,於1984年向外公布。功能是通過網絡讓不同的機器、不同的操作系統能夠彼此分享個別的數據,讓應用程序在客戶端通過網絡訪問位於服務器磁盤中的數據,是在類Unix系統間實現磁

ubuntu 16.04 nfs服務搭建

all more 系統 配置文件 comm 其他 pre ubuntu 實現 原文 nfs服務是實現Linux和Linux之間的文件共享,nfs服務的搭建比較簡單。 現在介紹如何在ubuntu16.04系統中搭建nfs服務,ubuntu的搭建比紅帽的還要簡單。 1、安裝