kubernetes / cloud-provider-openstack

Apache License 2.0
619 stars 610 forks source link

[cinder-csi-plugin] possibility to set bytes-per-inode and inode size on pv #1428

Closed VVvKamper closed 3 years ago

VVvKamper commented 3 years ago

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind feature

What happened:

We are trying to store a lot of small files on the disk and default (1 inode per 16 KB) fs settings is not suitable for such task

What you expected to happen:

Some parameters on the storage class to specify args for mkfs.* comand i.e. -i (bytes per inode), -I (inode size) and -O inline_data (enable data inlining) or maybe even ability to add arbitrary options.

Or maybe some annotations for pvc to specify this options per volume.

How to reproduce it:

Anything else we need to know?:

As i understand cinder-csi-plugin uses this code to format and mount fs on pv creation and there is no interface to add additional args for mkfs.*. I would be happy to try to provide PR for this feature but i'm not sure if it even possible to make such change in this upstream library. So my question is - do you think this feature is good for the project or it's too much burden to implement?

Environment:

jichenjc commented 3 years ago

@VVvKamper looks like you are referring to k8s code instead of CPO code https://github.com/kubernetes/cloud-provider-openstack/blob/master/pkg/csi/cinder/nodeserver.go#L397 called to format the disk but seems we can do nothing because as you pointed out, there is no way for that code (https://github.com/kubernetes/utils/blob/master/mount/mount_linux.go#L356-L367)
to accept param except the fs type .. maybe you can post this question to k8s repo as well to get some opinion ? if turn out k8s support and CPO doesn't provide those options, I think reasonable to add at CPO side... thanks

ramineni commented 3 years ago

@VVvKamper there is 'mountOptions' available while creating storageclass , https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.20/#storageclass-v1-storage-k8s-io, you can add extra options , those should be passed to the call.

jichenjc commented 3 years ago

@ramineni I guess the ask is for mkfs option not for the mount option ...

ramineni commented 3 years ago

@ramineni I guess the ask is for mkfs option not for the mount option ...

Ah, @VVvKamper please raise issue in kubernetes/utils repo , https://github.com/kubernetes/utils/issues . That would be the right place.

ramineni commented 3 years ago

/close Not in scope of this repo, pls raise issue in diff repo as suggested above.

k8s-ci-robot commented 3 years ago

@ramineni: Closing this issue.

In response to [this](https://github.com/kubernetes/cloud-provider-openstack/issues/1428#issuecomment-797234973): >/close >Not in scope of this repo, pls raise issue in diff repo as suggested above. Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.