<p>I am working on deploying Hyperledger Fabric test network on Kubernetes minikube cluster. I intend to use PersistentVolume to share cytpo-config and channel artifacts among various peers and orderers. Following is my PersistentVolume.yaml and PersistentVolumeClaim.yaml</p>
<pre><code>kind: PersistentVolume
apiVersion: v1
metadata:
  name: persistent-volume
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteMany
  nfs:
    path: &quot;/nfsroot&quot;
    server: &quot;3.128.203.245&quot;
    readOnly: false

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: persistent-volume-claim
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
</code></pre>
<p>Following is the pod where the above claim is mount on /data</p>
<pre><code>kind: Pod
apiVersion: v1
metadata:
  name: test-shell
  labels:
    name: test-shell
spec:
  containers:
    - name: shell
      image: ubuntu
      command: [&quot;/bin/bash&quot;, &quot;-c&quot;, &quot;while true ; do sleep 10 ; done&quot;] 
      volumeMounts:
      - mountPath: &quot;/data&quot;
        name: pv
  volumes:
    - name: pv
      persistentVolumeClaim:
        claimName: persistent-volume-claim
</code></pre>
<p>NFS is setup on my EC2 instance. I have verified NFS server is working fine and I was able to mount it inside minikube. I am not understanding what wrong am I doing, but any file present inside 3.128.203.245:/nfsroot is not present in test-shell:/data</p>
<p>What point am I missing. I even tried hostPath mount but to no avail. Please help me out.</p>

Abhijeet Bhowmik
<p>I think you should check the following things to verify that NFS is mounted successfully or not</p>
<ol>
<li><p>run this command on the node where you want to mount.</p>
<p><strong><code>$showmount -e nfs-server-ip</code></strong></p>
</li>
</ol>
<p>like in my case <strong><code>$showmount -e 172.16.10.161</code></strong>
Export list for 172.16.10.161:
/opt/share *</p>
<ol start="2">
<li><p>use <strong><code>$df -hT</code></strong> command see that Is NFS is mounted or not like in my case it will give output  <strong><code>172.16.10.161:/opt/share nfs4       91G   32G   55G  37% /opt/share</code></strong></p>
</li>
<li><p>if not mounted then use the following command</p>
<p><strong><code>$sudo mount -t nfs 172.16.10.161:/opt/share /opt/share</code></strong></p>
</li>
<li><p>if the above commands show an error then check firewall is allowing nfs or not</p>
<p><strong><code>$sudo ufw status</code></strong></p>
</li>
<li><p>if not then allow using the command</p>
<p><strong><code>$sudo ufw allow from nfs-server-ip to any port nfs</code></strong></p>
</li>
</ol>
<p>I made the same setup I don't face any issues. <a href="https://www.youtube.com/watch?v=ngGU33v4E9Y" rel="nofollow noreferrer">My k8s cluster of fabric is running successfully </a>. The hf k8s yaml files can be found at my <a href="https://github.com/piyushkumar96/bankconsortiumbcnet-multihost" rel="nofollow noreferrer">GitHub repo</a>. There I have deployed the consortium of Banks on hyperledger fabric which is a dynamic multihost blockchain network that means you can add orgs, peers, join peers, create channels, install and instantiate chaincode on the go in an existing running blockchain network.</p>
