This post is the background for Kubernetes Storage: PV, PVC, StorageClass and CSI. Kubernetes storage, at its core, takes the disks, LVs, NFS shares and S3 buckets covered here and hands them out to Pods automatically through an API. Knowing what sits underneath makes PVCs and CSI more than names to memorize.


Three kinds of storage: block, file, object

Block storage File storage Object storage
What the client sees A disk (/dev/sdb) it formats itself A shared directory An HTTP API
Unit of access Fixed-size blocks Files and directories Whole objects (PUT / GET)
Where the file system lives On the client (you run mkfs) On the server No file system, just buckets and keys
Shared by many machines Usually mounted by one machine only Many machines can read and write at once Yes, over the network
Good for Databases, VM disks, low latency Shared files, home directories, legacy systems Backups, logs, images and video, AI training data
Examples Local disks, LVM, iSCSI LUNs, AWS EBS NFS, SMB, CephFS, AWS EFS AWS S3, MinIO, RustFS, Ceph RGW, NetApp StorageGRID

In one sentence: block storage gives you a raw disk, file storage gives you a directory, object storage gives you a URL.


Block storage: local disks and LVM

Which disks does the machine have?

[root@controlplane ~]# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sr0          11:0    1 1024M  0 rom
vda         252:0    0   20G  0 disk
├─vda1      252:1    0    1M  0 part
├─vda2      252:2    0    1G  0 part /boot
└─vda3      252:3    0   19G  0 part
  ├─rl-root 253:0    0   17G  0 lvm  /
  └─rl-swap 253:1    0    2G  0 lvm  [SWAP]
vdb         252:16   0    2G  0 disk

This is a Rocky Linux 10 virtual machine:

  • TYPE disk is a whole disk, part is a partition on it, and rom is the optical drive.
  • vda is the system disk: vda1 is a 1M BIOS boot partition, vda2 is mounted on /boot, and vda3 is not mounted directly. Instead it is split further into rl-root (mounted on /) and rl-swap.
  • TYPE lvm means rl-root and rl-swap are LVM logical volumes. Rocky / RHEL lay out the system disk with LVM by default; more on that below.
  • vdb is an extra 2G disk, blank, with no partitions and not mounted.

The most direct option is to format all of vdb and mount it, but then one disk serves one purpose at a fixed size. To carve several pieces out of one (or more) disks and resize them later, you need LVM.

The three layers of LVM

LVM (Logical Volume Manager) abstracts physical disks into three layers:

PV (Physical Volume)    A disk or partition, e.g. /dev/vdb
  ↓ one or more PVs form
VG (Volume Group)       A storage pool, e.g. topolvm-vg
  ↓ carved out of the pool
LV (Logical Volume)     A block device you can format and mount, resizable
  • When the pool runs low, pvcreate a new disk and vgextend it into the VG. The pool grows and the LVs on it are unaffected.
  • LVs can be grown online (lvextend) and snapshotted.
  • To the user an LV is just an ordinary block device at /dev/<VG>/<LV>.

The system disk in the lsblk output above is a ready-made example: vda3 is a PV that forms a VG named rl, which is carved into two LVs, root and swap. The rl-root shown by lsblk is <VG>-<LV>, and the full path is /dev/rl/root.

Creating a PV and a VG

Initialize vdb as a PV, then create a VG named topolvm-vg:

[root@controlplane ~]# pvcreate /dev/vdb
  Physical volume "/dev/vdb" successfully created.

[root@controlplane ~]# vgcreate topolvm-vg /dev/vdb
  Volume group "topolvm-vg" successfully created

Check the result:

[root@controlplane ~]# vgs
  VG         #PV #LV #SN Attr   VSize   VFree
  rl           1   2   0 wz--n- <19.00g     0
  topolvm-vg   1   0   0 wz--n-  <2.00g <2.00g

[root@controlplane ~]# pvs
  PV         VG         Fmt  Attr PSize   PFree
  /dev/vda3  rl         lvm2 a--  <19.00g     0
  /dev/vdb   topolvm-vg lvm2 a--   <2.00g <2.00g

rl is the VG created when the system was installed (short for Rocky Linux; on RHEL it is called rhel). pvs shows it is made of /dev/vda3, #LV 2 is root and swap, and VFree 0 means all of its space has been given to those two LVs.

The new topolvm-vg:

  • #PV 1: the VG is made of one PV.
  • #LV 0: no LVs carved out yet.
  • #SN 0: no snapshots.
  • <2.00g: LVM keeps a little space for metadata, so it is slightly under 2G.

Why the VG is called topolvm-vg

The name comes from the next post, where TopoLVM lets Kubernetes carve LVs out of this VG automatically. If you are only practicing LVM, any name will do.

The life cycle of an LV, by hand

Create a 500M LV, format it and mount it:

lvcreate -L 500M -n demo topolvm-vg
mkfs.xfs /dev/topolvm-vg/demo
mkdir -p /mnt/demo
mount /dev/topolvm-vg/demo /mnt/demo
df -h /mnt/demo

The LV is 500M, yet Size shows only 436M. The missing 64M is the XFS log. XFS keeps its log inside the file system by default, newer versions of xfsprogs reserve at least 64M for it, and df doesn't count it as capacity. The 34M under Used is XFS's own metadata, not user data. /dev/mapper/topolvm--vg-demo and /dev/topolvm-vg/demo are the same device.

At this point lvs lists demo, #LV in vgs becomes 1 and VFree drops by 500M; lsblk shows a new topolvm--vg-demo under vdb (a device mapper device; the - in the name is escaped as --).

Grow it online to 1G; -r grows the file system too:

lvextend -r -L 1G /dev/topolvm-vg/demo
df -h /mnt/demo
  • 125 extents → 256 extents: LVM allocates space in extents, 4MiB each by default, so 125 × 4MiB = 500MiB.
  • -r makes lvextend call xfs_growfs after growing the LV. Nothing is unmounted and /mnt/demo stays usable the whole time.
  • log ... blocks=16384: 16384 × 4KiB = 64MiB, the log that was missing from df earlier. The log doesn't grow, so all of the added space counts as capacity and Size goes from 436M to 960M.

XFS can only grow

XFS cannot be shrunk. If you need to shrink an LV, use ext4: unmount, shrink the file system with resize2fs, then lvreduce. Doing it in the opposite order destroys data.

Clean up afterwards and give the space back to the VG:

umount /mnt/demo
lvremove -y /dev/topolvm-vg/demo
vgs

#LV of topolvm-vg is back to 0 and VFree is back to <2.00g: the space has returned to the VG.

Create → format → mount → grow → unmount → delete. Remember this order. The CSI driver in the next post does exactly the same thing, except Kubernetes runs it automatically for each PVC.


Block and file over the network: SAN and NAS

The problem with local disks is that only that machine can use them, and if the machine dies the data is stuck inside. Production environments usually concentrate disks in dedicated storage systems and serve them to servers over the network, in one of two ways:

SAN (Storage Area Network) NAS (Network Attached Storage)
Provides Blocks (LUNs or NVMe namespaces) Files (shared directories)
Protocols iSCSI, NVMe/TCP, FC (Fibre Channel) NFS, SMB
What the client sees A new disk, /dev/sdX or /dev/nvmeXnY mount server:/export /mnt
File system Formatted by the client Managed by the storage system
Shared by many machines Normally one machine only, otherwise you need a cluster file system Shared by design

With a SAN, servers need initiator tools to connect: iSCSI needs iscsi-initiator-utils (RHEL family) or open-iscsi (Debian family), NVMe/TCP needs nvme-cli, and redundant paths need device-mapper-multipath. NFS needs nfs-utils / nfs-common.

NetApp ONTAP

NetApp is one of the big names in enterprise storage. Its operating system, ONTAP, provides SAN and NAS from the same system (so-called unified storage). Some common terms:

  • Aggregate: a RAID group made of several physical disks; where the space comes from.
  • SVM (Storage Virtual Machine): one system can be split into several SVMs, each with its own network interfaces, protocol settings and admin accounts, much like multi-tenancy.
  • Volume: space carved out of an aggregate, which can be exported as a shared directory over NFS / SMB.
  • LUN: a block device that lives inside a volume and is served to servers over iSCSI / FC / NVMe.
  • Snapshot / SnapMirror: snapshots and replication between systems; backups and disaster recovery are usually left to the storage system.

ONTAP is also available in the cloud, for example Amazon FSx for NetApp ONTAP and Azure NetApp Files. NetApp also has an object storage line, StorageGRID, which offers an S3 API; more on that later.

Compared with LVM, an aggregate is like a VG and a volume / LUN like an LV, moved from the local machine to a dedicated system on the network, with snapshots, replication and multi-tenancy on top.


Object storage: S3

The object storage model

Object storage has no directory tree and no "modify the middle of a file" operation. It has only:

  • Bucket: a storage space, a top-level container.
  • Object: the data itself plus metadata, identified by a key.
  • Operations: PUT, GET and DELETE whole objects over HTTP, or LIST keys by prefix.

backups/2026/11/db.sql.gz looks like a path but is just a key that contains /; "directories" are simulated with prefixes.

In exchange, this model scales out to very large capacities, and any program that can send an HTTP request can use it.

The S3 API and compatible implementations

The AWS S3 API has become the de facto standard for object storage. Many products implement a compatible API, so the same SDK or CLI works with any of them by changing the endpoint:

Product Notes
AWS S3 The original, a cloud service
MinIO Written in Go, long the most common choice for self-hosted S3; the community edition is no longer maintained (see below), the commercial edition is AIStor
RustFS Written in Rust, Apache 2.0 licensed, 1.0 released in September 2026, with tools for migrating from MinIO
Ceph RGW Ceph's object gateway, which can share one cluster with Ceph's block and file storage
NetApp StorageGRID NetApp's enterprise object storage, able to spread data across several data centers

To use self-hosted S3 with the AWS CLI, just add --endpoint-url:

export AWS_ACCESS_KEY_ID=<access key>
export AWS_SECRET_ACCESS_KEY=<secret key>

aws s3 mb s3://backups --endpoint-url http://<s3 host>:9000
aws s3 cp db.sql.gz s3://backups/2026/11/ --endpoint-url http://<s3 host>:9000
aws s3 ls s3://backups --recursive --endpoint-url http://<s3 host>:9000

The same goes for code: configure the SDK with an endpoint, access key and secret key. This is the standard way for applications to use object storage: through a network API, not a mount.

The state of MinIO's community edition

Since October 2025 the MinIO community edition no longer ships official binaries or Docker images, only source code. In December of the same year the GitHub repo went into maintenance mode, and it was later archived. Existing deployments keep working but get no more updates or security fixes. For a new self-hosted S3, consider RustFS, Ceph RGW, or the commercial MinIO AIStor or NetApp StorageGRID.

Can a bucket be mounted as a directory?

Yes. FUSE tools (such as s3fs, geesefs and AWS's mountpoint-s3) mount a bucket as a directory, so programs that only know how to read and write files can use it. But remember that object storage is not a file system:

  • Changing a small part in the middle of a file rewrites the whole object underneath.
  • rename is "copy, then delete", not atomic, and slow for large files.
  • There are no file locks; several machines writing the same file overwrite each other.

So this kind of mount suits large sequential reads (reading datasets for AI training, serving static files), not running databases.


Who is responsible for keeping data safe?

Disks will fail. The question is which layer protects the data:

Method How Space cost
RAID Mirroring or parity across several disks inside one machine or storage system 2× for RAID 1, less for RAID 5/6
Replication Keep N copies of the data on different machines N×, commonly 3×
Erasure coding Split data into K pieces, compute M parity pieces and spread them across machines; up to M lost pieces can be recovered (K+M)/K×, e.g. 1.5× for 8+4

Distributed object stores such as MinIO, RustFS and Ceph already spread data across machines with erasure coding. If the disks underneath are themselves another replicating distributed storage system, the same data is protected twice, wasting several times the space and hurting performance.

So a common combination is distributed object storage on each machine's local disks (even whole disks without RAID), leaving reliability to the erasure coding on top. This idea comes back in the next post, when running an S3 service on Kubernetes and choosing a CSI driver.


Summary

  • Block storage gives you a raw disk, file storage gives you a directory, object storage gives you an HTTP API.
  • LVM's three layers, PV → VG → LV, turn physical disks into a pool you can carve up freely and grow online; the manual flow is lvcreate → mkfs → mount → lvextend → umount → lvremove.
  • A SAN provides blocks over iSCSI, NVMe/TCP or FC, a NAS provides files over NFS or SMB; NetApp ONTAP does both.
  • The S3 API is the de facto standard for object storage, and MinIO, RustFS, Ceph RGW and StorageGRID are all compatible. Applications should use the API; FUSE mounts only suit sequential reads.
  • Data reliability needs handling in only one layer: distributed object storage already uses erasure coding, so local disks underneath are enough.

Further reading

The LVM operations done by hand here, and the NFS, iSCSI and S3 mentioned along the way, are exactly what Kubernetes hands out to Pods automatically through PVs, PVCs and CSI drivers. If you're interested, read on:

Kubernetes Storage: PV, PVC, StorageClass and CSIHow PersistentVolumes, PersistentVolumeClaims and StorageClasses bind, static and dynamic provisioning, the CSI architecture and flow, dynamic provisioning of local disks with TopoLVM, and on to NetApp Trident, S3 object storage and COSIlcxlab.com/post/cka-storage

References

  1. Red Hat - Configuring and managing logical volumesdocs.redhat.com
  2. NetApp ONTAP documentationdocs.netapp.com
  3. Amazon S3 API Referencedocs.aws.amazon.com
  4. RustFSgithub.com
  5. MinIO CE in 2026: Retired Upstream, Source-Only, and What to Useglukhov.org
  6. Mountpoint for Amazon S3github.com