Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] No volume groups found (what changed?)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
brendlefly62
Tux's lil' helper
Tux's lil' helper


Joined: 19 Dec 2009
Posts: 93

PostPosted: Tue Feb 17, 2015 4:18 pm    Post subject: [Solved] No volume groups found (what changed?) Reply with quote

Can someone suggest what I might be missing about this?

I have a working system which boots from a luks encrypted root HDD and mounts lvm partitions during a custom init (initramfs). Now, as of a week ago, after I boot I cannot "see" the lvm partitions despite the fact that they are still successfully mounted and all info is available... what changed? and how do I fix this?

I've tried setting use_lvmetad = 1 in /etc/lvm/lvm.conf, as suggested in Sargastic's post on a similar problem in this forum (entitled: "Luks root disk, LVM partitions and vgextend"), but that did not work for me.

before I set use_lvmetad = 1, I got:
Code:
Oromis joe # lvs
  WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
  No volume groups found


after I set use_lvmetad = 1, I now just get:
Code:
Oromis joe # lvs
  No volume groups found


Again, this is a running system with 2 vg and each lv in use...
Code:
Oromis joe # df -h
Filesystem                     Size  Used Avail Use% Mounted on
/dev/mapper/vge2-root          2.0G  808M  1.1G  44% /
/dev/mapper/vge2-usr            43G   28G   13G  69% /usr
tmpfs                          200M  592K  200M   1% /run
dev                             10M     0   10M   0% /dev
shm                            998M  276K  998M   1% /dev/shm
/dev/mapper/vge2-var            20G  4.1G   15G  22% /var
/dev/mapper/vge2-tmp           9.8G   23M  9.2G   1% /tmp
/dev/mapper/vge2-opt           1.5G  508M  881M  37% /opt
/dev/mapper/vge2-home           68G   51G   15G  78% /home
/dev/mapper/vge2-srv           295G  239G   42G  86% /srv
/dev/mapper/vg_slim2-vm_store  788G  281G  468G  38% /home/joe/vm_store

Oromis joe # ls /dev/mapper/
control  edb1  ede1       vge2-opt   vge2-srv   vge2-tmp  vge2-var                       vg_slim2-vm_store
eda1     edc2  vge2-home  vge2-root  vge2-swap  vge2-usr  vg_slim2-extraSpaceJustInCase

Oromis joe # ls /dev/vge2/
home  opt  root  srv  swap  tmp  usr  var

etc.


I boot with a custom initramfs that uses busybox, cryptsetup, and lvm2 ... my custom init unlocks each encrypted block device and uses vgscan ... vchange -ay to make the lvs available. Seems to be they are available during that part of the boot, but evidently after I switchroot and continue with stock /sbin/init on openrc, they are not available. This is despite the fact that the related services are started in the sysinit runlevel:
Code:
Oromis joe # rc-status sysinit
Runlevel: sysinit
 lvmetad                                                                                                                         [  started  ]
 sysfs                                                                                                                           [  started  ]
 dmcrypt                                                                                                                         [  started  ]
 devfs                                                                                                                           [  started  ]
 dmesg                                                                                                                           [  started  ]
 kmod-static-nodes                                                                                                               [  started  ]
 tmpfiles.dev                                                                                                                    [  started  ]
 udev                                                                                                                            [  started  ]
 lvm                                                                                                                             [  started  ]
 device-mapper                                                                                                                   [  started  ]


This particular machine is running a x86_64 gentoo-sources kernel:
Code:
Oromis joe # uname -a
Linux Oromis 3.17.8-gentoo-r1 #3 Wed Feb 11 23:47:44 EST 2015 x86_64 AMD Athlon(tm) 64 Processor 3200+ AuthenticAMD GNU/Linux


I have several other systems that do not have the same problem. I suspect that I've made some silly error in kernel configuration, and I've tried to compare this "bad" one to my other "good" ones, but I haven't found the culprit yet.

I've also looked at Ipic's post in "other things gentoo" (entitled: "How to start lvmetad under openrc?") -- which led me to thinking that lvmetad might need to be started in my custom (initramfs) init... but that doesn't seem to be likely -- lvmetad was started (in sysinit runlevel) even before I set use_lvmetad ... so maybe it's not that it isn't running, maybe it's that it is running... should I remove lvmetad from sysinit runlevel? (I think I'll investigate these ideas a bit more.)
Meanwhile, I'm still hoping someone will be able to suggest what I might be missing...


Last edited by brendlefly62 on Tue Feb 17, 2015 8:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
brendlefly62
Tux's lil' helper
Tux's lil' helper


Joined: 19 Dec 2009
Posts: 93

PostPosted: Tue Feb 17, 2015 4:35 pm    Post subject: Reply with quote

removing lvmetad from the sysinit runlevel didn't help... after reboot, I still get:
Code:
Oromis joe # lvs
  WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
  No volume groups found

(lvmetad is running, though I did absolutely noting to ASK for its help... and lvm has no info about my VGs)
Code:
Oromis joe # ps -aef | grep lvm
root      2413     1  0 11:18 ?        00:00:00 /sbin/lvmetad -p /run/lvmetad.pid


Thinking: lvmetad manages metadata for lvm (that it gets from udev)... in my case, udev isn't discovering these devices, they come on line during custom init with help from mdev in busybox... and I have not built my initramfs with lvmetad (just lvm)...

This has not been a problem on any of my 6 other systems that function similarly... just on this one. So, it doesn't seem logical that I would need to modify the initramfs to add lvmetad support.

So what ELSE might be making the
What might I have broken in kernel upgrade from 3.17.7-gentoo to 3.17.8-r1-gentoo ??? that would affect my vanilla x86_64 system but have no effect on my other systems: 1 x x86 (gentoo-sources) 1 x x86 (hardened-sources) and 3 x x86_64 (hardened sources)
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Feb 17, 2015 7:30 pm    Post subject: Reply with quote

brendlefly62 ...

Read through twice, nothing stands out. I'll provide some details of my setup in case it offers some point of comparison:

initramfs (better-initramfs) does luks open, and lvscan, vgchange -y
No udev (mdev ... no device management in initramfs just lvm2 and cryptsetup)
No lvmetad running.
=sys-fs/lvm2-2.02.103 readline -clvm -cman -lvm1 -lvm2create_initrd -selinux -static -static-libs -thin -udev
'obtain_device_list_from_udev = 0' in /etc/lvm/lvm.conf
No warnings from lvs.

Sorry its not more detailed, if you have a questions just ask.

best ... khay
Back to top
View user's profile Send private message
brendlefly62
Tux's lil' helper
Tux's lil' helper


Joined: 19 Dec 2009
Posts: 93

PostPosted: Tue Feb 17, 2015 8:32 pm    Post subject: Reply with quote

khayyam,

Thanks much. Browsing the info you provided and checking it against mine,
Bottom line up front: :arrow: I changed to obtain_device_list_from_udev = 0, and now it works:
Code:
#    obtain_device_list_from_udev = 1
    obtain_device_list_from_udev = 0


When I restarted lvm, I got warnings (but lvs works): :D
Code:
Oromis joe # /etc/init.d/lvm restart
 * WARNING: you are stopping a sysinit service
 * Shutting down the Logical Volume Manager
 *   Shutting Down LVs & VGs ...
  WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
  Logical volume vg_slim2/vm_store contains a filesystem in use.
  Logical volume vge2/swap in use.
  Logical volume vge2/root contains a filesystem in use.
  Logical volume vge2/usr contains a filesystem in use.
  Logical volume vge2/var contains a filesystem in use.
  Logical volume vge2/tmp contains a filesystem in use.
  Logical volume vge2/opt contains a filesystem in use.
  Logical volume vge2/home contains a filesystem in use.
  Logical volume vge2/srv contains a filesystem in use.
 * Failed (possibly some LVs still needed for /usr or root)                                                       [ !! ]
 * Finished shutting down the Logical Volume Manager
 * Setting up the Logical Volume Manager ...
  WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!                                   [ ok ]
Oromis joe # lvs
  WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
  LV                   VG       Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  extraSpaceJustInCase vg_slim2 -wi-a----- 131.00g                                                   
  vm_store             vg_slim2 -wi-ao---- 800.00g                                                   
  home                 vge2     -wi-ao----  69.00g                                                   
  opt                  vge2     -wi-ao----   1.49g                                                   
  root                 vge2     -wi-ao----   2.00g                                                   
  srv                  vge2     -wi-ao---- 299.00g                                                   
  swap                 vge2     -wi-ao----   2.00g                                                   
  tmp                  vge2     -wi-ao----  10.00g                                                   
  usr                  vge2     -wi-ao----  43.00g                                                   
  var                  vge2     -wi-ao----  20.00


Regarding the warning, I'm still not sure why lvmetad is running -- I did nothing I'm aware of to ASK for it -- but since it is I decided to enable it. So I no longer get the warning. After reboot, the first use of "lvs" is slow and eventualy returns with:
Code:
/dev/fd0: open failed: No such device or address
/dev/sr0: open failed: No medium found
/dev/sr1: open failed: No medium found
[as well as correct list of VG/LVs]


I tried to correct the delay by filtering floppy and optical devices with:
Code:
filter = [ "r|/dev/nbd.*|", "r|/dev/fd*|", "r|/dev/sr*|", "a/.*/" ]

but that did not work, and I noticed this comment in lvm.conf:
Quote:
# Since "filter" is often overridden from command line, it is not suitable
# for system-wide device filtering (udev rules, lvmetad).
To hide devices
# from LVM-specific udev processing and/or from lvmetad, you need to set
# global_filter.

So I did that with:
Code:
global_filter = [ "r|/dev/nbd.*|", "r|/dev/fd*|", "r|/dev/sr*|", "a/.*/" ]


And now it works cleanly. :D
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Feb 17, 2015 10:28 pm    Post subject: Reply with quote

brendlefly62 wrote:
Thanks much. Browsing the info you provided and checking it against mine. Bottom line up front: :arrow: I changed to obtain_device_list_from_udev = 0, and now it works:

brendlefly62 ... you're welcome. I don't think lvmetad needs to be running, I've never had to start it for anything to work. If you followed the lvm wiki they start it in sysvinit, so perhaps that's why it there.

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum