Skip to content

Commit

Permalink
Remove unnecessary discard mount option for CephFS
Browse files Browse the repository at this point in the history
  • Loading branch information
simu committed Nov 8, 2023
1 parent 7c407d5 commit ea40b9a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ parameters:
# extended here
mirroring:
enabled: false
mount_options:
discard: true
mount_options: {}
storage_class_config:
allowVolumeExpansion: true

Expand Down
7 changes: 4 additions & 3 deletions docs/modules/ROOT/pages/references/parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ fspool:
# extended here
mirroring:
enabled: false
mount_options:
discard: true
mount_options: {}
storage_class_config:
allowVolumeExpansion: true
----
Expand All @@ -334,9 +333,11 @@ This configuration creates
* One `CephFilesystem` resource named `fspool`.
This CephFS instance is configured to have 3 replicas both for the metadata pool and its single data pool.
By default, the CephFS instance is configured to assume that metadata will consume roughly 20% and data roughly 80% of the storage cluster.
* A storage class which creates PVs on the CephFS instance, supports volume expansion and configures PVs to be mounted with `-o discard`.
* A storage class which creates PVs on the CephFS instance and supports volume expansion.
* A `VolumeSnapshotClass` associated with the storage class

NOTE: CephFS doesn't require mount option `discard`, and ceph-csi v3.9.0+ will fail to mount any CephFS volumes if the storage class is configured with mount option `discard`.

The key `data_pools` is provided to avoid having to manage a list of data pools directly in the hierarchy.
The values of each key in `data_pools` are placed in the resulting CephFS resource's field `.spec.dataPools`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ metadata:
app.kubernetes.io/name: cephfs-fspool-cluster
name: cephfs-fspool-cluster
name: cephfs-fspool-cluster
mountOptions:
- discard
mountOptions: []
parameters:
clusterID: syn-rook-ceph-cluster
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner
Expand Down

0 comments on commit ea40b9a

Please sign in to comment.