Using Persistent volumes from local storage

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

My cluster consists for 11 VMs. 4 running on each bare metal server

manager@cluster4-m1:~/pod-setup$ kubectl get nodes
cluster4-m1 Ready master 2d23h v1.18.0
cluster4-m2 Ready master 2d23h v1.18.0
cluster4-m3 Ready master 2d23h v1.18.0
cluster4-w1 Ready 2d22h v1.18.0
cluster4-w2 Ready 2d22h v1.18.0
cluster4-w3 Ready 2d22h v1.18.0

Kubernetes version: 1.18
Cloud being used: bare-metal
Installation method: My Cluster is installed on VMs running on Ubuntu LTS 18.04 images
Host OS: Ubuntu
CNI and version:I am using weaves.
CRI and version: kubernetes-cni 0.7.5-00

You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.

So here is the storage I have for worker nodes
├─funstoragevg-funstoragelv1 253:2 0 500G 0 lvm
├─funstoragevg-funstoragelv2 253:3 0 500G 0 lvm
└─funstoragevg-funstoragelv3 253:4 0 500G 0 lvm
I have created three logical volumes on my local disk.
sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
funstoragelv1 funstoragevg -wi-a----- 500.00g
funstoragelv2 funstoragevg -wi-a----- 500.00g
funstoragelv3 funstoragevg -wi-a----- 500.00g
root ubuntu-vg -wi-ao---- 44.04g
swap_1 ubuntu-vg -wi-a----- 976.00m

I am trying to follow this article


I am not able to figure out what my PersistentVolume yaml file would look like.
apiVersion: v1
kind: PersistentVolume
name: pv0001
type: local
storage: 10Gi
- ReadWriteOnce
volumeMode: Block
persistentVolumeReclaimPolicy: Retain
How do I specify the block device: /dev/mapper/funstoragevg-funstoragelv1?

Thanks a lot for time.