Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set multiple nodepaths to one sc #395

Closed
StormstoutY opened this issue Apr 1, 2024 · 2 comments
Closed

How to set multiple nodepaths to one sc #395

StormstoutY opened this issue Apr 1, 2024 · 2 comments
Labels

Comments

@StormstoutY
Copy link

The machine in my k8s cluster has two local ssd disks, which I mounted to /data1 and /data2 respectively. When I create storageClass, I hope that nodepath can be randomly selected from these two paths to balance a distribution of io as possible on the two disks. From the md, I see that nodePathMap is the place I can customize where to store the data on each node. So I wrote the yaml as:

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: local-path-data3
provisioner: rancher.io/local-path
parameters:
nodePathMap: [
{
"node": "DEFAULT_PATH_FOR_NON_LISTED_NODES",
"paths": ["/data1", "/data2"]
}
]
volumeBindingMode: WaitForFirstConsumer
reclaimPolicy: Delete

I want to know if this way of writing can take effect when creating sc, so that the nodepath of sc can be randomly selected from these two paths of each node in the cluster.

Copy link

github-actions bot commented Jun 1, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Jun 1, 2024
Copy link

github-actions bot commented Jun 7, 2024

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant