Skip to content

Support partition parameter #83

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

Closed
saad-ali opened this issue Aug 6, 2018 · 8 comments
Closed

Support partition parameter #83

saad-ali opened this issue Aug 6, 2018 · 8 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.
Milestone

Comments

@saad-ali
Copy link
Contributor

saad-ali commented Aug 6, 2018

GCE PD in-tree driver supports partitioning

    gcePersistentDisk:
      pdName: partitioned-disk
      fsType: ext4
      partition: 2
@davidz627 davidz627 added this to the Beta milestone Aug 6, 2018
@ehmm
Copy link
Contributor

ehmm commented Aug 14, 2018

Hi @saad-ali, @davidz627 I've created a quick patch that works that allows specifying the partition number as another parameters after the zone/volumeName. (https://github.com/ehmm/gcp-compute-persistent-disk-csi-driver/tree/feature/partitionInVolumeId)

As you can see I'm new here, so I don't know if you want to merge it, or maybe it's missing some testing (I see the unit-tests there) -- or just leave it for now, but leaving a link here in the mean time and if you want me to create a PR let me know.

@davidz627
Copy link
Contributor

/assign

I will be adding partitioning to volume_attributes. This reduces the amount of string parsing we have to do. We also want the volumeID to be as stable as possible (affects backwards/forwards compatibility) and don't want to set a precedent of adding extra information to the volume ID when needed. Volume attributes is a natural place for this new functionality to exist.

@msau42
Copy link
Contributor

msau42 commented Aug 16, 2018

Can you uniquely identify a volume if the volume id doesn't contain partition number though? ie multiple volumes on the same disk but on different partitions

@davidz627
Copy link
Contributor

You're right, the volumes are uniquely identified via volume ID so we would have conflicts here. I will change the PR to include partitions in Volume ID.

@davidz627
Copy link
Contributor

Additionally just found this in the spec:

Attributes MAY NOT uniquely identify
a volume. A volume uniquely identified by `id` SHALL always report
the same attributes.

just as extra reason to put it in the volume id

@davidz627 davidz627 added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 17, 2018
@msau42
Copy link
Contributor

msau42 commented Aug 17, 2018

@ehmm For your usecase, do you need hard capacity isolation (ie partition boundaries) or could using subdirectories + Kubernetes subpath feature work for you?

I think representing each partition as a separate PV in Kubernetes has some challenges with Pod scheduling, attaching and detaching, that I pointed out in #91

@ehmm
Copy link
Contributor

ehmm commented Aug 18, 2018

@msau42 for my use case the subPath solution would be great, I also wouldn't mind just having the root with all the subdirectories exposed as I have no isolation requirements. I personally don't imagine a lot of scenarios where isolation requirements would be needed, and I think that auto-mounting all partitions (with any supported fsType #93) is a good idea for general use cases.

@davidz627
Copy link
Contributor

Currently partition cannot be specified in attributes, it runs into the same issue as described with the in tree GCE PD here: kubernetes/kubernetes#57915.

Since @ehmm is no longer depending on this feature we will punt this until a general solution for both In-tree and CSI versions of GCE PD can be made. That will require core Kubernetes changes and will be tracked at the following issue: kubernetes/kubernetes#57915.

@davidz627 davidz627 added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Aug 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

4 participants