View previous topic :: View next topic |
Author |
Message |
wowpetr n00b
Joined: 12 May 2018 Posts: 12
|
Posted: Wed Jan 04, 2023 6:22 am Post subject: LVM updated....couldn't boot... |
|
|
So nice that Gentoo decided to disable USE=lvm flag of lvm2 package and after the update I spent lots of time booting from live usb disk and trying to understand what happened. |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30923 Location: here
|
Posted: Wed Jan 04, 2023 6:54 am Post subject: |
|
|
Did you read the news that portage proposed? _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
wjb l33t
Joined: 10 Jul 2005 Posts: 609 Location: Fife, Scotland
|
Posted: Wed Jan 04, 2023 12:28 pm Post subject: |
|
|
If the 3rd/4th paras of that news item had mentioned logical volumes or volume groups explicitly instead of referring to "LVM2", I'd probably have realised what was going to happen before it did. A suggestion to run vgdisplay to check for being affected would have been nice. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21639
|
Posted: Wed Jan 04, 2023 1:24 pm Post subject: |
|
|
The fourth paragraph does specifically mention lvchange: Code: | If you use LVM2 for any partitions, or if you use tools like 'lvchange', you
should enable USE=lvm. | I would expect that anyone using logical volumes would use lvchange in the course of doing so. Also, I will note that there is no shame in asking on the forum about news items that do not make sense. We had at least one such thread about this news item, because the poster had read the news item, and was unclear whether he should ignore it or not. |
|
Back to top |
|
|
wowpetr n00b
Joined: 12 May 2018 Posts: 12
|
Posted: Wed Jan 04, 2023 4:02 pm Post subject: |
|
|
I actually read the news, but it was some time ago and I didn't do anything about that at that time. Then when the updated lvm2 package was about to emerge I failed to notice -lvm USE flag and I believe there was no any warnings after installation that the flag was disabled and I wouldn't be able to boot if I use an lvm volume as the root device. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21639
|
Posted: Wed Jan 04, 2023 4:43 pm Post subject: |
|
|
Correct. For that reason, I always look at USE flag changes before upgrades, and in this particular case, as soon as I read the news item, I reviewed my package.use settings, so that I would not need to remember to check them when the maintainers made the change in the tree. |
|
Back to top |
|
|
wowpetr n00b
Joined: 12 May 2018 Posts: 12
|
Posted: Wed Jan 04, 2023 4:56 pm Post subject: |
|
|
However, I disagree with this decision to disable the main functionality of the package. The main purpose of this package is to provide a working lvm, not a by-product like a mapper. |
|
Back to top |
|
|
Tom_ Guru
Joined: 20 May 2004 Posts: 444 Location: France
|
Posted: Wed Jan 04, 2023 9:07 pm Post subject: |
|
|
Hi
I just felt into the lvm trap I just lost my lvm volumes. I just ran "emerge -uDavN world" without giving it too much thought. I admit that it was a mistake. I should have read the news but I haven't. Likely others will do the same.
I do understand the need to build lightweight system but I think that this change doesn't make sense and will break systems. Why not just defaulting to lvm2[lvm] instead of lvm2[-lvm]. If I install the lvm2 packages, I expect to have lvm2 installed. Enabling a flag to have lvm2 tools when installing lvm2 seem unatural.
Here is how I saved my system
Code: | emerge -av automake --nodeps
emerge -av lvm2 --nodeps |
Even I used the experimental binary repo, I couldn't use it to re-install lvm2, and it is compiled with the systemd flag which I don't have on my system. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21639
|
Posted: Wed Jan 04, 2023 10:30 pm Post subject: |
|
|
Gentoo did default to USE=+lvm for quite a while. The decision was made to change that on the belief that most people installing lvm2 were pulling it as a dependency, rather than a deliberate choice. I don't know how the maintainers determined that, so I cannot judge whether they had good reason to do that.
You should use --oneshot when repairing. You should not need to force install automake first, if you do not use --nodeps. You also shouldn't need to use a binary repository for this. If the system is in good enough state that you can install lvm2, then it should be in good enough state to build it. |
|
Back to top |
|
|
sublogic Apprentice
Joined: 21 Mar 2022 Posts: 222 Location: Pennsylvania, USA
|
Posted: Wed Jan 04, 2023 11:27 pm Post subject: |
|
|
Tom_ wrote: | If I install the lvm2 packages, I expect to have lvm2 installed. |
The confusion stems from upstream folding the device mapper support into LVM2. From https://sourceware.org/dm/: Quote: | Releases
The userspace code (dmsetup and libdevmapper) is now maintained alongside the LVM2 source available from http://sourceware.org/lvm2/. To build / install it without LVM2 use 'make device-mapper' / 'make install_device-mapper'. | So if you need the userspace side of device mapper (e.g. for cryptsetup) you need a piece of LVM2. That would be USE=-lvm sys-fs/lvm2. If you use LVM, you want all of it, USE=lvm sys-fs/lvm2.
I suppose the gentoo devs could have named the package sys-fs/device-mapper, deviating from the upstream name. Can't blame them though. I wouldn't have had the foresight. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Thu Jan 05, 2023 4:30 pm Post subject: |
|
|
wowpetr wrote: | However, I disagree with this decision to disable the main functionality of the package. The main purpose of this package is to provide a working lvm, not a by-product like a mapper. | ++
I didn't see any mention that the change was made due to problems with having lvm installed. The "--device-mapper-only" seems like the better solution for the edge case where having all of lvm installed was a problem. Even if "most people don't use LVM and only want device-mapper" is accurate, that seems like the wrong threshold. If I install LVM, I'm expecting... LVM.
Maybe a virtual or app-alternatives would be a better solution. If you emerge LVM, you get LVM. If LVM is installed as a dependency, you get app-alternatives/device-mapper. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
padde n00b
Joined: 19 Jan 2005 Posts: 53 Location: Germany
|
Posted: Mon Jan 09, 2023 7:09 am Post subject: |
|
|
Hah, that's just Gentoo's way of wishing me a Happy New Year
Not only did the world-update break LVM for me, but it also wouldn't build once I added the 'lvm' USE flag. As I had rebooted, my LVM volumes were gone, but since they hold data and backups, I didn't think that should impact the build. Only after carefully reading /var/tmp/portage/sys-fs/lvm2-2.03.17-r1/work/LVM2.2.03.17/config.log I noticed a ccache error, and remembered that I had ccache's data directory on one of the LVM volumes. Once I disabled ccache in make.conf temporarily, I could rebuild lvm2 and all is good.
So, Happy New Year to all of you as well |
|
Back to top |
|
|
Princess Nell l33t
Joined: 15 Apr 2005 Posts: 916
|
Posted: Sun Jan 15, 2023 2:43 pm Post subject: |
|
|
I fell into the same trap - half of the lvols were not visible after boot. Eventually figured it out after restoring lvm files from initramfs.
The news item could have been worded better. I never have reason to use lvchange.
Completely agree with everything wowpetr said.
While my system appears to work fully again, I would be interested in knowing if any of the installed packages that support the lvm USE flag need it enabled now. Looking at the Gentoo wiki, it looks like "probably not" for virtualbox, "probably yes" for udisks, but no idea about libblockdev. Looking at the emerge history, I would think "probably not" for udisks, and "probably yes" for libblockdev. How can I figure it out? |
|
Back to top |
|
|
russK l33t
Joined: 27 Jun 2006 Posts: 665
|
Posted: Fri Jun 16, 2023 1:33 am Post subject: |
|
|
I'm not sure if I'm just encountering this same issue now or if it's tangential.
Lately my box boots without finding the root filesystem, which is a LVM logical volume. It stops and asks for help.
Finally realized I can get into the 'shell' and activate all needed volumes with 'lvm lvchange -a y <vgname>'
I read some threads about this and added USE lvm globally. Rebuilt all packages. It still is a problem at boot.
I use genkernel. I rebuilt the initramfs and kernel but it's still a problem. Maybe I need a fix in genkernel?
At least I know how to work around at reboot time.
Cheers and thanks for any tips |
|
Back to top |
|
|
sMueggli Guru
Joined: 03 Sep 2022 Posts: 370
|
Posted: Fri Jun 16, 2023 8:25 am Post subject: |
|
|
russK wrote: | I read some threads about this and added USE lvm globally. Rebuilt all packages. It still is a problem at boot.
I use genkernel. I rebuilt the initramfs and kernel but it's still a problem. Maybe I need a fix in genkernel?
At least I know how to work around at reboot time. |
Please open a new discussion and provide details. |
|
Back to top |
|
|
russK l33t
Joined: 27 Jun 2006 Posts: 665
|
Posted: Sun Jun 18, 2023 1:22 pm Post subject: |
|
|
sMueggli wrote: |
Please open a new discussion and provide details. |
Thanks for the offer but I figured it out myself. I hadn't noticed that an update blew away my /etc/default/grub file. I recovered it from /etc/config-archive.
The GRUB_CMDLINE_LINUX_DEFAULT value was missing with 'dolvm' and other pertinent details.
Regards |
|
Back to top |
|
|
|