# don't find logical volumes (udev problem?)

## Silvio

I have an hd with a boot partition and a partition with luks and on the luks there is a lvm

I had this system running like that about a year on ~amd64 (i mean the state not uptime)

now the booting still works without problem.

i usually make my kernel/initrd with genkernel.

when i manually open luks and activate vg from the initrd they work fine and are linked in /dev/mapper

when i just enter the password then the it works too at the beginning the luks is opened and vg,lv are activeated and rootfilesystem is mounted

i don't know whether the device files are made or not but i suspect they are.

but after changing the vfs root to the root of the root filesystem (pivot_root) /dev/mapper of the new root is empty and stays empty

just some commands to demonstrate the situation after boot

```

root@yokto ~ # ls /dev/mapper/

control

root@yokto ~ # vgdisplay 

  /dev/cdrom1: open failed: No medium found

  No volume groups found

root@yokto ~ # cryptsetup luksOpen /dev/sda5 arst

Enter passphrase for /dev/sda5: 

Key slot 0 unlocked.

root@yokto ~ # ls /dev/mapper/

arst  control

root@yokto ~ # dmesg | tail

...

device-mapper: ioctl: unable to remove open device temporary-cryptsetup-18692

...

root@yokto ~ # vgdisplay 

  /dev/cdrom1: open failed: No medium found

  --- Volume group ---

  VG Name               yokto

  System ID             

  Format                lvm2

  Metadata Areas        1

  Metadata Sequence No  41

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                5

  Open LV               1

  Max PV                0

  Cur PV                1

  Act PV                1

  VG Size               111.55 GiB

  PE Size               4.00 MiB

  Total PE              28556

  Alloc PE / Size       24851 / 97.07 GiB

  Free  PE / Size       3705 / 14.47 GiB

  VG UUID               ZPG0mE-sAp8-HXcq-QzJ0-5lQG-5d8s-S2oFoW

   

root@yokto ~ # lvdisplay 

  /dev/cdrom1: open failed: No medium found

  /dev/mapper/yokto-swap_1: open failed: No such file or directory

  --- Logical volume ---

  LV Name                /dev/yokto/swap_1

  VG Name                yokto

  LV UUID                sNoR7H-EvyK-r0Cy-Pk02-QcDZ-UDnA-eILfoP

  LV Write Access        read/write

  LV Status              NOT available

  LV Size                4.57 GiB

  Current LE             1171

  Segments               1

  Allocation             inherit

  Read ahead sectors     auto

   

  /dev/mapper/yokto-gentoo: open failed: No such file or directory

  --- Logical volume ---

  LV Name                /dev/yokto/gentoo

  VG Name                yokto

  LV UUID                twXR5m-UDWa-MY31-NErZ-6X0i-Iwfi-stcEJY

  LV Write Access        read/write

  LV Status              NOT available

  LV Size                35.00 GiB

  Current LE             8960

  Segments               10

  Allocation             inherit

  Read ahead sectors     auto

...

```

comment 1: I should not have to luksOpen again since should already open since the root file system is on the luks - udev should just make the node

comment 2: i don't know whether "/dev/cdrom1: open failed: No medium found" has has anything to do with it

comment 3: I have not recently updated kernel nor (i think) udev or sysvinit

comment 4: as for the cd i have recently had a music cd in the cd drive - something i've very seldom but i don't see how this can have anything to do with this

----------

## Rexilion

You probably created the VG with /dev/cdrom as a part of it...

----------

## Silvio

no luks is on sda5

and vg is on luks

appart from that cdrom is really my cddrive and as i mentioned it does boot and activate vg in initrd and even mount a lv

----------

## Silvio

ok i asked in the udev channel and they told me to downgrade lvm which worked - should i file a bug in gentoobugs?

----------

## Rexilion

 *Silvio wrote:*   

> ok i asked in the udev channel and they told me to downgrade lvm which worked - should i file a bug in gentoobugs?

 

Great  :Smile:  . Don't know whether a bugreport is good, did they already know it?

----------

