# JupyterHub User Home Data on NFS mount

**URL:** <https://discourse.jupyter.org/t/jupyterhub-user-home-data-on-nfs-mount/4299>\
**Category:** JupyterHub\
**Tags:** community, communication, jupyterhub, how-to, help-wanted\
**Created:** [May 7, 2020, 9:17am UTC](https://discourse.jupyter.org/t/jupyterhub-user-home-data-on-nfs-mount/4299 "2020-05-07T09:17:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atul\_Yadav](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/atul_yadav/32/1535_2.png) [@Atul\_Yadav](https://discourse.jupyter.org/u/Atul_Yadav)\
**Post date:** [May 7, 2020, 9:17am UTC](https://discourse.jupyter.org/t/jupyterhub-user-home-data-on-nfs-mount/4299/1 "2020-05-07T09:17:49Z")

</div>

Hi Team,

Unable to fulfil the requirement of storage getting error:  
“[Warning] pod has unbound immediate PersistentVolumeClaims”

ENV Details:  
Bare Metal Cluster  
Ubuntu OS  
Juypterhub deployed “[https://zero-to-jupyterhub.readthedocs.io/en/latest/](https://zero-to-jupyterhub.readthedocs.io/en/latest/)”

Description  
root@server11:~/locuz# kubectl get pods -n jhub  
NAME READY STATUS RESTARTS AGE  
hub-7fc98799f4-4cz45 1/1 Running 0 9m20s  
jupyter-user1 0/1 Pending 0 60m  
jupyter-user3 0/1 Pending 0 55m  
proxy-d7c9758bc-x9wjs 1/1 Running 0 9m30s  
root@server11:~/locuz#

root@server11:~/locuz# kubectl --namespace=jhub describe pod jupyter-user2  
Name: jupyter-user2  
Namespace: jhub  
Priority: 0  
Node:   
Labels: app=jupyterhub  
chart=jupyterhub-0.8.2  
component=singleuser-server  
heritage=jupyterhub  
[hub.jupyter.org/network-access-hub=true](http://hub.jupyter.org/network-access-hub=true)  
release=jhub  
Annotations: [hub.jupyter.org/username:](http://hub.jupyter.org/username:) user2  
Status: Pending  
IP:  
Init Containers:  
block-cloud-metadata:  
Image: jupyterhub/k8s-network-tools:0.8.2  
Port:   
Host Port:   
Command:  
iptables  
-A  
OUTPUT  
-d  
169.254.169.254  
-j  
DROP  
Environment:   
Mounts:   
Containers:  
notebook:  
Image: jupyter/base-notebook:latest  
Port: 8888/TCP  
Host Port: 0/TCP  
Args:  
start-singleuser.sh  
–ip=“0.0.0.0”  
–port=8888  
–NotebookApp.default\_url="/lab"  
–debug  
Requests:  
memory: 1073741824  
Environment:  
CHOWN\_HOME: yes  
JUPYTERHUB\_API\_TOKEN: a9abb8c56b9c4e5eb581cf2708bd58ef  
JPY\_API\_TOKEN: a9abb8c56b9c4e5eb581cf2708bd58ef  
JUPYTERHUB\_ADMIN\_ACCESS: 1  
JUPYTERHUB\_CLIENT\_ID: jupyterhub-user-user2  
JUPYTERHUB\_HOST:  
JUPYTERHUB\_OAUTH\_CALLBACK\_URL: /user/user2/oauth\_callback  
JUPYTERHUB\_USER: user2  
JUPYTERHUB\_API\_URL: [http://10.98.141.80:8081/hub/api](http://10.98.141.80:8081/hub/api)  
JUPYTERHUB\_BASE\_URL: /  
JUPYTERHUB\_SERVICE\_PREFIX: /user/user2/  
MEM\_GUARANTEE: 1073741824  
JUPYTER\_IMAGE\_SPEC: jupyter/base-notebook:latest  
JUPYTER\_IMAGE: jupyter/base-notebook:latest  
Mounts:  
/home/jovyan from home (rw,path=“home/user2”)  
Conditions:  
Type Status  
PodScheduled False  
Volumes:  
home:  
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)  
ClaimName: nfs-home-pvc  
ReadOnly: false  
QoS Class: Burstable  
Node-Selectors:   
Tolerations: [hub.jupyter.org/dedicated=user:NoSchedule](http://hub.jupyter.org/dedicated=user:NoSchedule)  
hub.jupyter.org\_dedicated=user:NoSchedule  
[node.kubernetes.io/not-ready:NoExecute](http://node.kubernetes.io/not-ready:NoExecute) for 300s  
[node.kubernetes.io/unreachable:NoExecute](http://node.kubernetes.io/unreachable:NoExecute) for 300s  
Events:  
Type Reason Age From Message

* * *

Warning FailedScheduling 14s default-scheduler pod has unbound immediate PersistentVolumeClaims (repeated 2 times)  
root@server11:~/locuz#  
root@server11:~/locuz# kubectl get sc  
No resources found.  
root@server11:~/locuz# kubectl get pvc,pv  
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE  
persistentvolumeclaim/nfs-home-pvc Bound nfs-home-pv 50Gi RWX 158m

NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE  
persistentvolume/nfs-home-pv 50Gi RWX Retain Bound default/nfs-home-pvc 158m  
root@server11:~/locuz#  
root@server11:~/locuz# kubectl describe pvc,pv  
Name: nfs-home-pvc  
Namespace: default  
StorageClass:  
Status: Bound  
Volume: nfs-home-pv  
Labels: app=mission-control  
type=nfs-volume  
Annotations: [kubectl.kubernetes.io/last-applied-configuration:](http://kubectl.kubernetes.io/last-applied-configuration:)  
{“apiVersion”:“v1”,“kind”:“PersistentVolumeClaim”,“metadata”:{“annotations”:{},“labels”:{“app”:“mission-control”,“type”:“nfs-volume”},"nam…  
[pv.kubernetes.io/bind-completed:](http://pv.kubernetes.io/bind-completed:) yes  
[pv.kubernetes.io/bound-by-controller:](http://pv.kubernetes.io/bound-by-controller:) yes  
Finalizers: [[kubernetes.io/pvc-protection](http://kubernetes.io/pvc-protection)]  
Capacity: 50Gi  
Access Modes: RWX  
VolumeMode: Filesystem  
Mounted By:   
Events:

Name: nfs-home-pv  
Labels: app=mission-control  
id=jfmc-es-pv  
type=nfs-volume  
Annotations: [kubectl.kubernetes.io/last-applied-configuration:](http://kubectl.kubernetes.io/last-applied-configuration:)  
{“apiVersion”:“v1”,“kind”:“PersistentVolume”,“metadata”:{“annotations”:{},“labels”:{“app”:“mission-control”,“id”:“jfmc-es-pv”,“type”:"nfs-…  
[pv.kubernetes.io/bound-by-controller:](http://pv.kubernetes.io/bound-by-controller:) yes  
Finalizers: [[kubernetes.io/pv-protection](http://kubernetes.io/pv-protection)]  
StorageClass:  
Status: Bound  
Claim: default/nfs-home-pvc  
Reclaim Policy: Retain  
Access Modes: RWX  
VolumeMode: Filesystem  
Capacity: 50Gi  
Node Affinity:   
Message:  
Source:  
Type: NFS (an NFS mount that lasts the lifetime of a pod)  
Server: 192.168.126.151  
Path: /home/  
ReadOnly: false  
Events:   
root@server11:~/locuz#  
root@server11:~/locuz# cat config.yaml  
proxy:  
secretToken: 97141abb55ea5321867979cb57bb2e6a86a2f4d6bb166fca45aedb07c212c42d  
service:  
type: NodePort  
nodePorts:  
http: 30080  
https: 30443  
networkPolicy:  
enabled: true

hub:  
cookieSecret: 1470700e01f77171c2c67b12130c25081dfbdf2697af8c2f2bd05621b31100bf  
db:  
type: sqlite-memory

debug:  
enabled: true

singleuser:  
defaultUrl: “/lab”  
image:  
name: jupyter/base-notebook  
tag: latest  
storage:  
type: “static”  
static:  
pvcName: “nfs-home-pvc”  
subPath: ‘home/{username}’  
extraEnv:  
CHOWN\_HOME: ‘yes’  
uid: 0  
fsGid: 0  
cmd: “start-singleuser.sh”

Thank You  
Atul Yadav

---

<div class="post-metadata">

**Author:** ![Atul\_Yadav](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/atul_yadav/32/1535_2.png) [@Atul\_Yadav](https://discourse.jupyter.org/u/Atul_Yadav)\
**Post date:** [May 29, 2020, 5:16am UTC](https://discourse.jupyter.org/t/jupyterhub-user-home-data-on-nfs-mount/4299/2 "2020-05-29T05:16:45Z")

</div>

Create the nfs pv for fulfilling the requirement.

### PV

```auto
kind: PersistentVolume
metadata:
  name: nfs-home-pv
  labels:
    app: mission-control
    id: jfmc-es-pv
    type: nfs-volume
spec:
  capacity:
    storage: 50Gi
  accessModes:
  - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  nfs:
    ####################################
    # MUST SET ACTUAL NFS SERVER IP HERE
    server: 192.168.126.151
    ####################################
    path: "/home"
    readOnly: false
---

### PVC
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: nfs-home-pvc
  labels:
    app: mission-control
    type: nfs-volume
spec:
  accessModes:
  - ReadWriteMany
  storageClassName: ""
  resources:
    requests:
      storage: 50Gi
  selector:
    matchLabels:
      app: mission-control
      id: jfmc-es-pv

Thank You
Atul Yadav
```
