feat(lvm): install lvm commands symlinks
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
- [x] I have tested it locally
- [ ] I have reviewed and updated any documentation if relevant
- [ ] I am providing new code and test(s) for it
CC @teigland
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.
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.
Ping @johannbg
@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 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.
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.