Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] vgdisplay doesn't seem to work with root-on-LVM
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
CmdrMoozy
n00b
n00b


Joined: 13 Feb 2013
Posts: 4

PostPosted: Sun Mar 23, 2014 2:51 am    Post subject: [SOLVED] vgdisplay doesn't seem to work with root-on-LVM Reply with quote

I have what is perhaps a somewhat atypical setup on my laptop. I have a single hard disk, /dev/sda. I have EFI and boot partitions, as well as a third partition (/dev/sda3) which contains my system. This partition is encrypted with cryptsetup's LUKS extension. Inside this encrypted partition, I have a LVM volume group, which contains my root and swap partitions. These disks are configured by a genkernel initrd, and then the system boots normally.

The entire boot process works flawlessly. However, after booting, "vgdisplay" doesn't seem to work properly. For example:

Code:

# pvdisplay /dev/mapper/root
  --- Physical volume ---
  PV Name               /dev/mapper/root
  VG Name               localdisk
  PV Size               931.31 GiB / not usable 1.69 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              238416
  Free PE               0
  Allocated PE          238416
  PV UUID               I3wArE-g6yl-9ywx-Df8d-3w1N-wuuQ-FrQjoK
   
# vgdisplay localdisk
  Volume group "localdisk" not found
  Skipping volume group localdisk


Note that, even though "pvdisplay" says explicitly that the physical volume I gave it is a member of the volume group "localdisk", "vgdisplay" then reports that the volume group "localdisk" can't be found.

Here is the output from some other commands, which all seem fine to me:

Code:

# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1953525168 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7C4580AF-CC26-4522-8FC8-0289C67CF4AE
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953525134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          206847   100.0 MiB   EF00  EFI system partition
   2          206848          411647   100.0 MiB   8300  Linux filesystem
   3          411648      1953525134   931.3 GiB   8300  Linux filesystem

# dmsetup info
Name:              localdisk-swap
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        2
Event number:      0
Major, minor:      251, 1
Number of targets: 1
UUID: LVM-75jhqCBBFayCVQECgTH8NOFfkrjYCqiHa0oIafGLgBOZbuhrYISOHQo97Gamy74E

Name:              localdisk-root
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        1
Event number:      0
Major, minor:      251, 2
Number of targets: 1
UUID: LVM-75jhqCBBFayCVQECgTH8NOFfkrjYCqiHzpANUdFbPYfliL6gmKoBdhol2zj9Gl6z

Name:              root
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        2
Event number:      0
Major, minor:      251, 0
Number of targets: 1
UUID: CRYPT-LUKS1-d5f7cc568cc74201be3fde108e37162e-root

# mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=1006523,mode=755)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
/dev/mapper/localdisk-root on / type ext4 (rw,noatime,commit=0)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,size=805564k,mode=755)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc)
cpu on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nodev,noexec,nosuid)


Does anyone have any suggestions as to why this is happening?


Last edited by CmdrMoozy on Wed Mar 26, 2014 1:59 am; edited 1 time in total
Back to top
View user's profile Send private message
CmdrMoozy
n00b
n00b


Joined: 13 Feb 2013
Posts: 4

PostPosted: Wed Mar 26, 2014 1:59 am    Post subject: Reply with quote

The problem ended up being simply that, because my LVM partition was "/dev/mapper/root" (this is where the genkernel initrd places dm_crypt devices by default), the filters in /etc/lvm/lvm.conf were excluding it from being scanned. Adjusting my filters to:

Code:

scan = [ "/dev", "/dev/mapper" ]
filter = [ "r|/dev/nbd.*|", "a|^/dev/sd|", "a|^/dev/md|", "a|^/dev/mapper/root$|" ]


Seems to have done the trick - now "vgscan" (or the /etc/init.d/lvm init script) properly finds and initialized my volume group, and "vgdisplay" lists it just like it should.[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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