Best practices for mounting disk

Hi,

In order to run K3OS in production, I’m looking for a best practices to mount a disk for storage.

My K3OS will be single node. So I plan to use local-path storage for volume provisioning. This node will host more and more services, so I fear to have to extend the disk space in the future.
So I decided to:

  • use two disks: one for system and one for data
  • as the data will grow, and due to hyper-converged approach of our internal cloud solution, the effective disk cannot grow directly and we can only provision more disks, so LVM2.

In config.yaml I activated LVM2:

 boot_cmd:
  - "vgscan"
  - "vgchange -a y"

The :question: is: how should I mount this LVM2 volume in config.yaml?

  • should I directly run the "mount /dev/data/storage /var/lib/rancher/k3s/storage"?
  • should I patch the /etc/fstab with "echo /dev/data/storage /var/lib/rancher/k3s/storage ... > /etc/fstab"?
  • any other option?

I’ve got the same question. Did you ever find an answer or at least something that worked? I tried making a mount for in the command yaml. Then used the write_files to write an fstab with my nfs. That didn’t fully work. After boot I could run mount -a and it would mount my nfs share but didn’t do it automatically on boot

Perhaps should you ensure NFS is started. Have a look at Starting NFS at boot time