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

Rework how lvm.conf is patched #595

Merged
merged 6 commits into from
Nov 18, 2024

Conversation

simondeziel
Copy link
Member

@simondeziel simondeziel commented Nov 6, 2024

Another attempt at fixing canonical/lxd#14341

This changes how lvm.conf is patched to be done at build time rather than at daemon.start time. This implies that now, executables are using /snap/lxd/current instead of /snap/lxd/${rev}. /etc/lvm/profile files are now included in the snap. It's unclear if they are used or not but they are so small (11KiB) that it doesn't hurt to ship them.

Lastly, the daemon visible /etc/lvm dir now contains 2 symlinks pointing to the read-only snap mount while still allowing the creation of the /etc/lvm/archive and /etc/lvm/backup directories backed by the tmpfs /etc:

# LD_LIBRARY_PATH=/snap/lxd/current/lib/:/snap/lxd/current/lib/x86_64-linux-gnu/:/snap/lxd/current/zfs-2.2/lib PATH=/snap/lxd/current/zfs-2.2/bin:/snap/lxd/current/bin:$PATH nsenter --mount=/run/snapd/ns/lxd.mnt -- ls -l /etc/lvm
total 0
drwx------ 2 root root 1860 Nov 14 19:54 archive
drwx------ 2 root root   40 Nov 14 19:54 backup
lrwxrwxrwx 1 root root   29 Nov 14 19:43 lvm.conf -> /snap/lxd/x1/etc/lvm/lvm.conf
lrwxrwxrwx 1 root root   28 Nov 14 19:43 profile -> /snap/lxd/x1/etc/lvm/profile

@simondeziel simondeziel force-pushed the lvm-conf-patch branch 3 times, most recently from dbd5b0b to a17e777 Compare November 7, 2024 18:51
@simondeziel simondeziel marked this pull request as ready for review November 11, 2024 20:20
@simondeziel simondeziel marked this pull request as draft November 11, 2024 20:20
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
@simondeziel simondeziel marked this pull request as ready for review November 14, 2024 20:34
@simondeziel
Copy link
Member Author

@tomponline when you get a chance, I'm eager to see if that will improve the situation with lvm slowness with latest/edge :)

@tomponline tomponline merged commit 4329499 into canonical:latest-edge Nov 18, 2024
4 checks passed
@simondeziel simondeziel deleted the lvm-conf-patch branch November 18, 2024 13:51
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.

2 participants