Changes

Jump to navigation Jump to search
Global persistent volumes
=== Global persistent volumes ===
In contrast, global persistent volumes are provided cluster-wide and are accessible from any node (managed internally with rook-ceph). They reside on SSDs and thus should be reasonably fast, however, depending on where the volume ends up, data will probably be transferred across the network to/from the node. Thus, they are slower than local-ssd, but leave you considerably more flexible, as they do not require pods to run on specific nodes. AlsoCurrently, there is no constraint on maximum size except global pool for physical limitations. Currently, there is a total of 20 TB of cluster-wide SSD storage, which we plan to increase considerably in the near future.  Compared to creating local persistent volumes, the only thing which needs to be changed is the storage class to "ceph-ssd". <syntaxhighlight lang="yaml">apiVersion: v1kind: PersistentVolumeClaimmetadata: # the name of the PVC, we refer to as this in the container configuration name: tf-mnist-global-pvc spec: resources: requests: # storage resource request. This PVC can only be bound to volumes which # have at least 8 GiB of storage available. storage: 8Gi  # the requested storage class, see tutorial. storageClassName: ceph-ssd  # access mode is mandatory accessModes: - ReadWriteOnce - ReadOnlyMany # For me (Felix) it worked only with the additional following line: volumeMode: Filesystem</syntaxhighlight>  Since anyone can mount global persistent volumes in the same namespace, they can and should be used to share datasets. The name of a PVC which contains a useful dataset should start with "dataset-" and be descriptive, so that it can easily be found by other users. Also, the root of the PVC should contain a README with informations about the dataset (at least the source and what exactly it is).  A note on mounting. Currently (will change in the near future), ceph volumes can be either mounted ReadWrite by a single pod only, or ReadOnly has been replaced by multiple pods. Thus, the workflow for a static dataset is to create the PVC, then create a pod to write all the data to it, then delete this pod and mount it read only from now on so it can be used in multiple podsCephFS hostPaths.
== Reading/writing the contents of a persistent volume ==

Navigation menu