Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

LVM updated....couldn't boot...

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
16 posts • Page 1 of 1
Author
Message
wowpetr
n00b
n00b
Posts: 15
Joined: Sat May 12, 2018 1:36 pm

LVM updated....couldn't boot...

  • Quote

Post by wowpetr » Wed Jan 04, 2023 6:22 am

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.
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Wed Jan 04, 2023 6:54 am

Did you read the news that portage proposed?
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
wjb
l33t
l33t
User avatar
Posts: 681
Joined: Sun Jul 10, 2005 9:40 am
Location: Fife, Scotland

  • Quote

Post by wjb » Wed Jan 04, 2023 12:28 pm

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. :)
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Wed Jan 04, 2023 1:24 pm

The fourth paragraph does specifically mention lvchange:

Code: Select all

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.
Top
wowpetr
n00b
n00b
Posts: 15
Joined: Sat May 12, 2018 1:36 pm

  • Quote

Post by wowpetr » Wed Jan 04, 2023 4:02 pm

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.
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Wed Jan 04, 2023 4:43 pm

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.
Top
wowpetr
n00b
n00b
Posts: 15
Joined: Sat May 12, 2018 1:36 pm

  • Quote

Post by wowpetr » Wed Jan 04, 2023 4:56 pm

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.
Top
Tom_
Guru
Guru
User avatar
Posts: 450
Joined: Thu May 20, 2004 5:55 pm
Location: France

  • Quote

Post by Tom_ » Wed Jan 04, 2023 9:07 pm

Hi
I just felt into the lvm trap :lol: 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: Select all

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.
Top
Hu
Administrator
Administrator
Posts: 24403
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Wed Jan 04, 2023 10:30 pm

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.
Top
sublogic
Guru
Guru
User avatar
Posts: 388
Joined: Mon Mar 21, 2022 3:02 am
Location: Pennsylvania, USA

  • Quote

Post by sublogic » Wed Jan 04, 2023 11:27 pm

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][b]Releases[/b]
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'.[/quote]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.
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Thu Jan 05, 2023 4:30 pm

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?
Top
padde
n00b
n00b
Posts: 58
Joined: Wed Jan 19, 2005 10:56 pm
Location: Germany

  • Quote

Post by padde » Mon Jan 09, 2023 7:09 am

Hah, that's just Gentoo's way of wishing me a Happy New Year :lol:

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 :D
Top
Princess Nell
l33t
l33t
User avatar
Posts: 947
Joined: Fri Apr 15, 2005 1:00 pm

  • Quote

Post by Princess Nell » Sun Jan 15, 2023 2:43 pm

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?
Top
russK
l33t
l33t
User avatar
Posts: 665
Joined: Tue Jun 27, 2006 3:44 am

  • Quote

Post by russK » Fri Jun 16, 2023 1:33 am

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
Top
sMueggli
l33t
l33t
Posts: 627
Joined: Sat Sep 03, 2022 9:22 am

  • Quote

Post by sMueggli » Fri Jun 16, 2023 8:25 am

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.
Top
russK
l33t
l33t
User avatar
Posts: 665
Joined: Tue Jun 27, 2006 3:44 am

  • Quote

Post by russK » Sun Jun 18, 2023 1:22 pm

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
Top
Post Reply
  • Print view

16 posts • Page 1 of 1

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic