Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

k3s/longhorn: use LVM to support additional storage disks #693

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tserong
Copy link
Member

@tserong tserong commented Apr 21, 2023

This is a really simple use of LVM to just create a linear logical volume over /dev/vd[b-z], then mount that for use by Longhorn. The default is still to deploy with only one additional disk, but at least now if more than one disk is requested, we'll actually do something with the extra disks.

This is a really simple use of LVM to just create a linear logical volume
over `/dev/vd[b-z]`, then mount that for use by Longhorn.  The default is
still to deploy with only one additional disk, but at least now if more
than one disk is requested, we'll actually do something with the extra
disks.

Signed-off-by: Tim Serong <tserong@suse.com>
@tserong tserong requested a review from m-ildefons April 21, 2023 09:32
@tserong tserong added the DNM label Apr 21, 2023
@tserong
Copy link
Member Author

tserong commented Apr 21, 2023

Hang on, just tried a deploy on Tumbleweed which failed for some reason...

@tserong
Copy link
Member Author

tserong commented Apr 21, 2023

node4:~ # lvcreate --name longhorn-data -l 100%VG longhorn
  WARNING: failed to init udev for external device info, using none.
  /dev/longhorn/longhorn-data: not found: device not cleared
  Aborting. Failed to wipe start of new LV.

Huh?

@tserong
Copy link
Member Author

tserong commented Apr 21, 2023

Deployed again, didn't have the problem >sigh<

I assume this is something potentially glitchy at some lower level than sesdev, so removing DNM label.

@tserong tserong removed the DNM label Apr 21, 2023
@tserong
Copy link
Member Author

tserong commented Apr 27, 2023

Thinking about this further, I actually wonder if I should make this LVM setup optional, or perhaps just not bother doing it at all.

My reason for adding longhorn support to sesdev in the first place was so I'd have a convenient playground for experimenting with longhorn. If I stitch all the extra disks together with LVM automatically, that means I can't play with Longhorn's "add disk" functionality...

mkfs.ext4 /dev/vdb

# This won't handle more than 25 disks. Tim is pretty sure that's fine.
vgcreate longhorn /dev/vd[b-z]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably shouldn't call the vg longhorn, because that means we end up with /dev/longhorn/longhorn-data, and /dev/longhorn is the namespace used for longhorn volumes.

@tserong tserong marked this pull request as draft May 4, 2023 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant