# LVM does not work with kernel linux-2.6.25-gentoo-r4

## hfk

New kernel linux-2.6.23-gentoo-r3 -> linux-2.6.25-gentoo-r4

LVM is compiled into both kernels.

Using the old kernel LVM is detected and mounted.

With the new kernel nothing occurs even no message.

I don't understand what happens. Does LVM not work with kernel inux-2.6.25-gentoo-r4 at all? Is my kernel configuration wrong?

 vgscan under linux-2.6.23-gentoo-r3 gives

```

....

      Setting backup/backup_dir to /etc/lvm/backup

      global/fallback_to_lvm1 not found in config: defaulting to 0

vgscan      Setting global/locking_type to 1

vgscan      File-based locking selected.

vgscan      Setting global/locking_dir to /var/lock/lvm

vgscan      Locking /var/lock/lvm/P_global WB

vgscan    Wiping cache of LVM-capable devices

vgscan    Wiping internal VG cache

vgscan    Finding all volume groups

vgscan      /dev/sda: size is 488397168 sectors

vgscan      /dev/sda1: size is 208782 sectors

vgscan      /dev/sda1: size is 208782 sectors

vgscan      /dev/sda1: No label detected

...vgscan      /dev/sda11: size is 272205297 sectors

vgscan      /dev/sda11: size is 272205297 sectors

vgscan      /dev/sda11: lvm2 label detected

vgscan      Locking /var/lock/lvm/V_data RB

vgscan    Finding volume group "data"

vgscan      /dev/sda11: lvm2 label detected

vgscan      /dev/sda11: lvm2 label detected

vgscan      Unlocking /var/lock/lvm/V_data

vgscan      Unlocking /var/lock/lvm/P_global

vgscan      Dumping persistent device cache to /etc/lvm/cache/.cache

vgscan      Locking /etc/lvm/cache/.cache (F_WRLCK, 1)

vgscan      Unlocking fd 4

vgscan    Wiping internal VG cache
```

vgscan under linux-2.6.25-gentoo-r4

```
...

      Setting backup/archive_dir to /etc/lvm/archive

      Setting backup/backup_dir to /etc/lvm/backup

      global/fallback_to_lvm1 not found in config: defaulting to 0

vgscan      Setting global/locking_type to 1

vgscan      File-based locking selected.

vgscan      Setting global/locking_dir to /var/lock/lvm

vgscan      Locking /var/lock/lvm/P_global WB

vgscan    Wiping cache of LVM-capable devices

vgscan    Wiping internal VG cache

vgscan    Finding all volume groups

vgscan  No volume groups found

vgscan      Unlocking /var/lock/lvm/P_global

vgscan      Dumping persistent device cache to /etc/lvm/cache/.cache

vgscan      Locking /etc/lvm/cache/.cache (F_WRLCK, 1)

vgscan      Unlocking fd 4

vgscan    Wiping internal VG cache
```

----------

## frostschutz

Which version of LVM are you using? Try using the latest one (2.02.39). Works fine for me. If it doesn't for you, compare the configs (gunzip < /proc/config.gz) of both kernels. Since you made a big update (2.6.23 -> 2.6.25) chances are that there is some difference in the kernel config that breaks LVM or hard disk detection in general for you?

----------

## hfk

I am using LVM  (sys-fs/lvm2) 2.02.28-r4. 

Can I update to the latest version 2.02.36 without any risk?

----------

## frostschutz

usually it's the downgrading that's risky, not the upgrading. lvm2 even supports old lvm1 volumes I believe, but naturally lvm1 won't understand lvm2 format at all  :Smile: 

----------

## hfk

Thanks,

an update of LVM did it.

Heiner

----------

