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

feat(lvm): install lvm commands symlinks #2133

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

Conversation

keentux
Copy link
Contributor

@keentux keentux commented Dec 19, 2022

May I suggest, with this patch, to add lvm core functionality to the initrd tree.

It will install for convenience, lvm's core commands tools. lvm package installs all of them as symlink to the binary, and they are universally used without lvm command.
It would be helpful for admin to recreate a familiar environment during the emergency shell. If someone is reaching for these tools in the initrd it's probably because something is wrong, and so the admin may be stressed or flustered and may not connect that "lvm" as a command does everything they need. So recreating a familiar environment will really help them.

Nevertheless, I agree to keep the minimal stuff as possible to the initrd, but as it is "only" symlink, it doesn't increase a lot the size, see below, we just add 1K Bytes:

localhost:~ # ls -lh --block-size=K /boot/test
-rw------- 1 root root 29963K Dec 19 14:04 initrd-5.19.8-1-default-after
-rw------- 1 root root 29962K Dec 19 14:03 initrd-5.19.8-1-default-before

So, What do you think about this changes for helping with the user experience ?

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

@github-actions github-actions bot added lvm Issues related to the lvm module modules Issue tracker for all modules labels Dec 19, 2022
@LaszloGombos
Copy link
Collaborator

CC @teigland

@keentux keentux force-pushed the lvm-commands branch 2 times, most recently from 526d313 to 60c5993 Compare December 20, 2022 14:58
Copy link
Member

@aafeijoo-suse aafeijoo-suse left a comment

Choose a reason for hiding this comment

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

Regardless of the need to add these symlinks, this doesn't work in Leap/SLE due to the way the lvm2 package is shipped.

@keentux keentux marked this pull request as draft December 28, 2022 09:38
It will install for convenience, lvm's core commands tools.

Lvm package installs all of them as symlink to the binary,
and they are universally used without `lvm` command. If someone
is reaching for these tools in the initrd it's probably because
something is wrong, and so the admin may be stressed or flustered
and may not connect that "lvm" as a command does everything they
need. So recreating a familiar environment during the emergency
shell will really help them.

Signed-off-by: Valentin Lefebvre <valentin.lefebvre@suse.com>
@keentux
Copy link
Contributor Author

keentux commented Dec 28, 2022

Thank you @aafeijoo-suse for the review ! Indeed, I tested only on Tumbleweed...
I change the way to find symlinks and tested if it well installed on every SUSE distribution and also for Feora/debian. Should be good now.

@keentux keentux marked this pull request as ready for review December 28, 2022 12:04
@stale
Copy link

stale bot commented Feb 2, 2023

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

@stale stale bot added the stale communication is stuck label Feb 2, 2023
Copy link
Collaborator

@LaszloGombos LaszloGombos left a comment

Choose a reason for hiding this comment

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

LGTM

@stale stale bot removed the stale communication is stuck label Feb 2, 2023
@LaszloGombos LaszloGombos added the enhancement Issue adding new functionality label Feb 2, 2023
@johannbg johannbg removed the enhancement Issue adding new functionality label Feb 13, 2023
@keentux
Copy link
Contributor Author

keentux commented Feb 20, 2023

Ping @johannbg

@LaszloGombos LaszloGombos added the enhancement Issue adding new functionality label Mar 6, 2023
@LaszloGombos
Copy link
Collaborator

@keentux what do you think about doing this only if "debug" dracut module is also installed (and not do it if dracut module is not installed) ?

@aafeijoo-suse would this help to move it forward ?

@aafeijoo-suse
Copy link
Member

aafeijoo-suse commented Aug 22, 2023

@aafeijoo-suse would this help to move it forward ?

Sorry, I don't see the need to add extra symlinks. You will have to convince someone else.

@Geertsky
Copy link

I'm working on a dracut module capable of installing a minimal OS at pre-mount using ansible. (https://github.com/Geertsky/dracut-bambini). Because ansible relies on these links I currently create the links in the dracut-bambini module. But they should be created by the lvm module. Possibly only when the dracut-module is included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue adding new functionality lvm Issues related to the lvm module modules Issue tracker for all modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants