This message was deleted.
# general
a
This message was deleted.
b
We have Longhorn working in our clusters but only recently. I am by no means an expert. I will share my config notes, in the hopes it helps you. We run RKE2 on-top of Ubuntu VMs in vSphere. Disk Pre-Requisites : Add second virtual hard disk to Ubuntu node Prep the drive as follows lsblk (get /dev/sd* from this list) mkdir -p /mnt/longhorn • parted /dev/sdb mklabel gpt (or whatever the free device was from lsblk) • parted -a opt /dev/sdb mkpart primary ext4 0% 100% • lsblk • mkfs.ext4 -L longhorn /dev/sdb1 • lsblk -o NAME,FSTYPE,LABEL,UUID,MOUNTPOINT Add entry to fstab to maintain persistence across reboots : LABEL=longhorn /mnt/longhorn ext4 defaults 0 2 mount -a • df -Th (make sure volume is mounted) Ubuntu Pre-Requisites : Make sure the following packages are installed • open-iscsi and nfs-common Disable multipathd : • systemctl stop multipathd && systemctl disable multipathd Load dm_crypt kernel module : • lsmod | grep dm_crypt (if no output load the module from steps below) • modprobe dm-crypt • echo dm-crypt | tee -a /etc/modules (for persistence) Load iscsi_tcp kernel module : • modprobe iscsi_tcp • lsmod | grep iscsi_tcp (check if it loaded) • echo iscsi_tcp | tee -a /etc/modules (for persistence) Mount volume to Longhorn : From Rancher, access the Longhorn GUI. Repeat steps below for each node Select Node from the top menu bar • Select Edit Node and Disks from the Operations Dropdown Disable Scheduling for the default-disk The Garbage Can icon will become selectable. Click it to delete this volume Click Add Disk Accept default Name and Disktype • Enter /mnt/longhorn under Path Enable Scheduling Click Save Wait for all nodes to show Schedulable under Status • Click Dashboard in the top menu bar and make sure there are no errors
🙌 1
w
Did you get RWX volumes working though - my experience with harvester clusters is that these volumes are tricky to get working - but hoping if installing longhorn in cluster it might be more up-to-date and likely to work...
b
We did, yes. You don't need to modify the default longhorn storage class (it defaults to RWO). In your claims, if you request RWX, it will create its own Ganesha NFS server inside K8s and deploy the volume RWX. I've never used Harvester and to be honest, I am not the K8s guy. I am the sysadmin who is helping my devops guy get storage working. Excuse my lack of correct terminology
w
No worries - this is all good to hear, I shall give this a try!