hetznercloud / csi-driver

Kubernetes Container Storage Interface driver for Hetzner Cloud Volumes
MIT License
620 stars 102 forks source link

Support a minimal node kernel version for the XFS options compatibility #690

Open jooola opened 1 month ago

jooola commented 1 month ago

TL;DR

Related to https://github.com/hetznercloud/csi-driver/issues/648#issuecomment-2275758882

The node kernel may not support all options set during the mkfs.xfs command (from the csi driver image). This leads to problem when mounting the file system with incompatible features/options.

Expected behavior

To make sure the created XFS file system work on a known set of linux kernels, we might want to configure a set of options compatible with those node kernels.

For example, we want to support linux kernels >= 5.15, we can do the following:

$ cat /usr/share/xfsprogs/mkfs/lts_5.15.conf
# V5 features that were the mkfs defaults when the upstream Linux 5.15 LTS
# kernel was released at the end of 2021.

[metadata]
bigtime=1
crc=1
finobt=1
inobtcount=1
reflink=1
rmapbt=0

[inode]
sparse=1
nrext64=0

$ mkfs.xfs -f  -c options=/usr/share/xfsprogs/mkfs/lts_5.15.conf /dev/mapper/scsi-0HC_Volume_101135663