local-path-provisioner
local-path-provisioner copied to clipboard
Can provisioner detect disk size of hostPath?
config for local-path
nodePathMap:
- node: hello-test-ssd-0003.host
paths:
- /mnt/nvme6n1
- /mnt/nvme7n1
- /mnt/nvme8n1
- /mnt/nvme9n1
- /mnt/nvme10n1
- /mnt/nvme11n1
- node: hello-test-ssd-0004.host
paths:
- /mnt/nvme6n1
- /mnt/nvme7n1
- /mnt/nvme8n1
- /mnt/nvme9n1
- /mnt/nvme10n1
- /mnt/nvme11n1
storageClass:
create: true
name: local-path-ssd
size of nvme is 4Ti
then I find that two 4Ti pv were create on one nvme
kubectl -n hello-705aba43 get pvc minio hello-serve-3 | awk '!/VOLUME/{print$3}' | xargs kubectl get pv -oyaml | grep /mnt/nvme6n1 -C 10
capacity:
storage: 4Ti
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: minio
namespace: hello-705aba43
resourceVersion: "6951593"
uid: 2995ff46-6ad8-4fb0-80bc-a5e07ae76615
hostPath:
path: /mnt/nvme6n1/pvc-2995ff46-6ad8-4fb0-80bc-a5e07ae76615_hello-705aba43_minio
type: DirectoryOrCreate
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- hello-test-ssd-0003.host
persistentVolumeReclaimPolicy: Delete
--
capacity:
storage: 4Ti
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: hello-serve-3
namespace: hello-705aba43
resourceVersion: "6951796"
uid: 3da15b64-4d58-4154-a6c9-5fc32e56bf71
hostPath:
path: /mnt/nvme6n1/pvc-3da15b64-4d58-4154-a6c9-5fc32e56bf71_hello-705aba43_hello-serve-3
type: DirectoryOrCreate
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- hello-test-ssd-0003.host
persistentVolumeReclaimPolicy: Delete
I don't know if it can get the disk capacity to create pv on disk correctly