From d16cc0db06608bfe3858c531a3b45cb78cb464e7 Mon Sep 17 00:00:00 2001 From: Tuan-Dat Tran Date: Tue, 8 Oct 2024 04:40:16 +0200 Subject: [PATCH] Added notes for longhorn nodes Signed-off-by: Tuan-Dat Tran --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 5569440..5d3dddc 100644 --- a/README.md +++ b/README.md @@ -50,3 +50,24 @@ export KUBECONFIG=~/.kube/config ``` Install flux and continue in the flux repository. + +## Longhorn Nodes + +To create longhorn nodes from existing kubernetes nodes we want to increase +their storage capacity. Since we're using VMs for our k3s nodes we can +resize the root-disk of the VMs in the proxmox GUI. + +Then we have to resize the partitions inside of the VM so the root partition +uses the newly available space. +When we have LVM-based root partition we can do the following: + +```sh +# Create a new partition from the free space. +sudo fdisk /dev/sda +# echo "n\n\n\n\n\nw\n" +# Create a LVM volume on the new partition +sudo pvcreate /dev/sda3 +sudo vgextend k3s-vg /dev/sda3 +# Use the newly available storage in the root volume +sudo lvresize --extents +100%FREE --resizefs /dev/k3s-vg/root +```