liveBook · Manning

Volume mode

As explained in Kubernetes in Action, Second Edition

Volume mode is a PersistentVolumeClaim specification that selects filesystem or raw-block presentation for the requested storage.

Volume mode is the PersistentVolumeClaim spec field that requests storage as either a filesystem or a raw block device. Filesystem is the default. section 10.2.1

Choose the mode according to how the application consumes storage:

  • Filesystem mounts the PersistentVolume at a directory in the container’s file tree. section 10.2.1
  • Block exposes the volume as a raw block device without a filesystem, allowing applications to handle data directly. section 10.2.1
  • Block mode is typically used by specialized applications such as database systems. section 10.2.1

Default filesystem request

A quiz-data PersistentVolumeClaim that omits volumeMode requests a filesystem volume automatically. Add volumeMode: Block when the application requires an unformatted raw device. section 10.2.1

How Kubernetes in Action, Second Edition covers it

How deep it goes
Defines both modes, their container presentation, default behavior, and typical use, but does not detail implementation internals.
Examples
Uses a quiz-data PersistentVolumeClaim that omits volumeMode and therefore requests filesystem storage.
What you can do after
Configure a PersistentVolumeClaim to request filesystem or raw-block presentation for an application.
How it connects
Connects PersistentVolumeClaim, PersistentVolume, containers, filesystems, raw block devices, and database systems.

Also explained in

Compare how 2 books explain volume mode →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.