This message was deleted.
# longhorn-storage
a
This message was deleted.
1
b
Have you checked out Longhorn Multiple Disk Support?
a
I'll read up on it. Thanks. My intention was to not allow Longhorn to use any root partitioned space. As of now my K3s distro already takes a lot of root space for container images and such so there is not much to spare for Longhorn to use. My thoughts were I want Longhorn to have full access to a dedicated disk that from the OS level I can expand since I'm on VMware and set it up as an LVM. I couldn't find any documentation that details these approaches so I just mounted my disk at
/var/lib/longhorn
and res-installed Longhorn software.
a
I read that. I'll give it another read but I found it to be a little confusing. Thanks for offering your input.
f
Does anyone have an example of a bind mount they setup in their
/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?
@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-fstab
a
I came across that too. It was still a little confusing for me as it seemed the command line syntax may have been opposite of what the
/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
Very weird and I couldn't seem to make sense of it. I 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 at
/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.
f
I 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 at
/var/lib/longhorn
which was an ext4 FS, and my
/mnt/DATA
disk was formatted with XFS.
If 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 guess
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.
Yeah, this should be the correct order of operations
Wish this type of stuff was talked about more online and in the docs
I 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.
a
From what I have observed, this is the location where PV's are created. I can see them under
/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.
f
From what I have observed, this is the location where PV’s are created. I can see them under
/var/lib/longhorn/replicas/
Oh. 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
a
I read that section but didn't fully understand it, but I think I am actually now getting what you mean. Longhorn engine-binaries still go on root partition at
/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?
f
Longhorn engine-binaries still go on root partition at
/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?
Yes, it is correct!
a
Wow. Honestly thank you very much. That was very much going over my head before. Now I get what that configuration means. I appreciate your help Phan!!!
🙌 1
115 Views