ancient-raincoat-46356
07/21/2022, 6:31 PM/etc/fstab
for mounting /var/lib/longhorn
to a secondary disk to be used exclusively by longhorn so I'm not using the root partition space for any disk provisioning?
A little context. I have a secondary disk I want to use for Longhorn PV's. Running on Ubuntu 20.04, secondary disk is configured as an Logical Volume. It has been formatted with XFS filesystem and mounted at /mnt/DATA
. It is 20G and I only want longhorn to use this 20G when provisioning new PV's.billowy-painting-56466
07/22/2022, 2:37 AMancient-raincoat-46356
07/22/2022, 3:22 PM/var/lib/longhorn
and res-installed Longhorn software.billowy-painting-56466
07/22/2022, 3:39 PMancient-raincoat-46356
07/22/2022, 3:49 PMfamous-journalist-11332
07/26/2022, 9:56 PMDoes anyone have an example of a bind mount they setup in their@ancient-raincoat-46356 I think it should work. Can you give it a try https://serverfault.com/questions/613179/how-do-i-do-mount-bind-in-etc-fstabfor mounting/etc/fstab
to a secondary disk to be used exclusively by longhorn so I’m not using the root partition space for any disk provisioning?/var/lib/longhorn
ancient-raincoat-46356
07/26/2022, 9:58 PM/etc/fstab
syntax was. I ended up aborting going down that path as even when I would test the setup, I would notice that the directory /var/lib/longhorn/engine-binaries
was missing when I listed the files on the bind mount at /mnt/DATA
/var/lib/longhorn
which was an ext4 FS, and my /mnt/DATA
disk was formatted with XFS. I ditched that whole setup and started over from scratch. I was successful with formatting my extra disk first with ext4 FS, mounting that at /var/lib/longhorn/
and then install Longhorn on the cluster via the Rancher app. All seems to be working much better now that I performed those initial steps. Wish this type of stuff was talked about more online and in the docs. I spent a lot of time trying to understand what the initial setup looks like for my case but I get that there can be a bunch of different types of setup depending on the infrastructure.famous-journalist-11332
07/26/2022, 10:13 PMI may have had an issue with crossing two different types of files systems. Longhorn was on the system first so it wound up on the root partition atIf Longhorn was in the system first before you do the bind mount, Longhorn might have already downloaded the binary into the root FS. After the bind mount, Longhorn is confused because it cannot find the previously downloaded binary. That is my guesswhich was an ext4 FS, and my/var/lib/longhorn
disk was formatted with XFS./mnt/DATA
I was successful with formatting my extra disk first with ext4 FS, mounting that atYeah, this should be the correct order of operationsand then install Longhorn on the cluster via the Rancher app. All seems to be working much better now that I performed those initial steps./var/lib/longhorn/
Wish this type of stuff was talked about more online and in the docsI think there are not a lot of users who want to customize this mount point as it is only used to store the engine binary which is small and doesn’t growth over time.
ancient-raincoat-46356
07/26/2022, 10:18 PM/var/lib/longhorn/replicas/
. I'm pretty sure that was mentioned in the docs and was my main reason for wanting to have longhorn off of the root partition and give it its' own dedicated space. In my org, we have seen our fair share of problems because things fill up the root partition and since Longhorn was made to provide/provision disk space, not having it on root seemed like an obvious no brainer.famous-journalist-11332
07/26/2022, 10:19 PMFrom what I have observed, this is the location where PV’s are created. I can see them underOh. For the PVC data, Longhorn allow you to specify the location as @billowy-painting-56466 mentioned above https://rancher-users.slack.com/archives/CC2UQM49Y/p1658504355676159?thread_ts=1658428268.061329&cid=CC2UQM49Y/var/lib/longhorn/replicas/
ancient-raincoat-46356
07/26/2022, 10:22 PM/var/lib/longhorn
but with that configuration in place, it allows me to pick another location for the replica images? Am I understanding that correctly now?famous-journalist-11332
07/26/2022, 10:22 PMLonghorn engine-binaries still go on root partition atYes, it is correct!but with that configuration in place, it allows me to pick another location for the replica images? Am I understanding that correctly now?/var/lib/longhorn
ancient-raincoat-46356
07/26/2022, 10:23 PM