Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Luks root disk, LVM partitions and vgextend
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
Sargastic
n00b
n00b


Joined: 28 Aug 2011
Posts: 57

PostPosted: Sat Dec 27, 2014 2:48 pm    Post subject: [SOLVED] Luks root disk, LVM partitions and vgextend Reply with quote

Hi,

I recently installed a new Gentoo box. I'm using what seems to be a quite usual configuration : disk is split into 4 partitions (bios, boot, swap and rootfs). RootFS is luks/dm-crypt'ed, and I'm using LVM on it. The dm-crypted partition "is" an LVM PV, holds one volume group (namge 'vg') which contains two logical volumes ('vg-root' and 'vg-home').

The initramfs, made through genkernel, seems okay - or at least good enough to let everything boot.

So I've got a running system.

The boot disk is a small SSD one. I want to increase storage by adding another disk. Since I'm already using dm-crypt and lvm, it would be a shame not to go on with those tools. I luksFormat-ed the new disk, made it into an LVM physical volume... and now I'm stuck. I want to extend the original volume group (which contains the vg-root and vg-home logical volumes), and then extend the vg-home logical volume.

But LVM cannot find the "original" physical volume nor volume group ('second' is the PV created on the new disk I plan to use to extend everything) :

Code:

# pvscan
  WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
  PV /dev/mapper/second         lvm2 [931.51 GiB]
  Total: 1 [931.51 GiB] / in use: 0 [0   ] / in no VG: 1 [931.51 GiB]
# vgscan
  WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
  Reading all physical volumes.  This may take a while...
  No volume groups found
# ls /dev/vg
home  root
# ls /dev/mapper/
control  root  second  vg-home  vg-root


I guess I may have done something wrong somewhere :oops: but I'm quite at a loss on what and where.

Any help or ideas ?

Tia.


Last edited by Sargastic on Mon Feb 16, 2015 8:27 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: 133

PostPosted: Mon Feb 16, 2015 6:57 pm    Post subject: Reply with quote

Did you ever get any help with this? I have similar symptoms:

No volume groups found:
Code:
Oromis joe # lvs
  WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
  No volume groups found


But it's 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


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.
Please let me know if you got (or get) it figured out.
Back to top
View user's profile Send private message
Sargastic
n00b
n00b


Joined: 28 Aug 2011
Posts: 57

PostPosted: Mon Feb 16, 2015 8:26 pm    Post subject: Reply with quote

Hello,

brendlefly62 wrote:
Did you ever get any help with this? I have similar symptoms:


No help, but found a way out nonetheless. Silly me, I did not write it here.

brendlefly62 wrote:
No volume groups found:
Code:
Oromis joe # lvs
  WARNING: lvmetad is running but disabled. Restart lvmetad before enabling it!
  No volume groups found


I just activated lvmetad. In lvm.conf,

Code:
use_lvmetad = 1


That was all that my box needed to be happy. I hope it will be as easy for you.
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