Static RBD PV mount options #3307
LukeMauldin
started this conversation in
General
Replies: 6 comments
|
@LukeMauldin, have you tried creating a storageclass and adding the storageclass name in the pvc/PV object? |
0 replies
|
If I use a storageclass I am able to specify the mount options but I am following the static-pv example where the Ceph rbd volume is already created and there is no storageclass specified in that example. |
0 replies
|
Even I case of static pvc you can specify the storageclass to fetch the mount options. Examples might not be covering everything. |
0 replies
|
Can you please give me an example?
… On Aug 10, 2022, at 7:58 AM, Madhu Rajanna ***@***.***> wrote:
Even I case of static pvc you can specify the storageclass to fetch the mount options. Examples might not be covering everything.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
0 replies
|
Is there anyone who can provide an example of using a storageclass with a static pvc? |
0 replies
|
You have kubectl get pv/pvc-42b935f9-96d3-4c33-be07-f9826cb8ab43 -oyaml
apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
pv.kubernetes.io/provisioned-by: rook-ceph.rbd.csi.ceph.com
creationTimestamp: "2022-08-16T11:05:15Z"
finalizers:
- kubernetes.io/pv-protection
name: pvc-42b935f9-96d3-4c33-be07-f9826cb8ab43
resourceVersion: "4658"
uid: babdfa85-e591-4174-a09f-e4d41476b41a
spec:
accessModes:
- ReadWriteOnce
capacity:
storage: 1Gi
claimRef:
apiVersion: v1
kind: PersistentVolumeClaim
name: rbd-pvc
namespace: default
resourceVersion: "4653"
uid: 42b935f9-96d3-4c33-be07-f9826cb8ab43
csi:
controllerExpandSecretRef:
name: rook-csi-rbd-provisioner
namespace: rook-ceph
driver: rook-ceph.rbd.csi.ceph.com
fsType: ext4
nodeStageSecretRef:
name: rook-csi-rbd-node
namespace: rook-ceph
volumeAttributes:
clusterID: rook-ceph
imageFeatures: layering
imageFormat: "2"
imageName: csi-vol-4eac376d-1d53-11ed-b8c5-daca746cf3c6
journalPool: replicapool
pool: replicapool
storage.kubernetes.io/csiProvisionerIdentity: 1660646054917-8081-rook-ceph.rbd.csi.ceph.com
volumeHandle: 0001-0009-rook-ceph-0000000000000001-4eac376d-1d53-11ed-b8c5-daca746cf3c6
mountOptions:
- discard noatime
persistentVolumeReclaimPolicy: Delete
storageClassName: rook-ceph-block
volumeMode: Filesystem
status:
phase: Bound |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Following documentation: https://github.com/ceph/ceph-csi/blob/devel/docs/static-pvc.md#create-rbd-static-pv
There is no documented way to specify mount options such as
noatime,discard. When using ceph with storageclass to create dynamic PVC, can specify mount options: https://github.com/ceph/ceph-csi/blob/devel/examples/rbd/storageclass.yaml#L147-L148Need a way to specify mount options when mounting rbd static pv.
Environment details
All reactions