hi,

I was following this guide:

[HOWTO] lvm2 for root, swap and software suspend2 (edit)

however is just working half way through. I created the initrd like this:

/lvm2create_initrd -c /etc/lvm/lvm.conf (kernerl version)
I don't know if this is scrip is only for a current installation or one from scratch. Perhaps my error is because I am building a new installation.

Also I build busybox and lvm2 with like this:

USE="static -nolvmstatic" emerge busybox lvm2
Although it doesn't mention emerging lvm2 statically.

Before I use to get

No volumes found
Now it appears this, I don't know whether is an improvement or not:

Locking type 1 initialisation failed.
Locking type 1 initialisation failed.
vFS: Mounted root (ext2 filesystem) readonly
Freeind unused kernel memory: 228k feed
initrd: Mounting /proc
cpio: extract_archive: .: File exists
48 blocks
initrd: Finding device mapper major and minor numbers 910.63)
initrd: Activating LVM@ volumes
Locking type 1 initialisation failed.
Locking type 1 initialisation failed.
Setup suspend2 hibernation
/sbin/init: /sbin/init: 113: cannot create /proc/suspend/resume2: Directory non-existent
/sbin/init: /sbin/init: 113: cannot create /proc/suspend/resume2: Directory non-existent
initrd: Mounting root filesystem /dev/kewl/root ro
mount: Mounting /dev/kewl/root on /rootvol failed: No such file or directory
\t*FAILEd*

*** Entering LVM2 rescue shell. Exit shell to continue. ***
I found on google that a possible repair is this"

The simple fix is to add --ignorelockingfailure to the vgchange command
I do this in LVM2 rescue shell and I get:

No volume groups found
But I can activate them regularly with LiveCD in order to chroot and try different workarounds.

Also I've palyed around with modifying your scrip in here:

echo "$PRE Activating LVM2 volumes"
lvm vgscan

# run a shell if we're passed lvm2rescue on commandline
if [ "$rescue" = "YES" ]; then
lvm vgchange --ignorelockingfailure -P -a y
do_shell
else
lvm vgchange --ignorelockingfailure -a y
fi
And change:

echo "$PRE Activating LVM2 volumes"
lvm vgscan

# run a shell if we're passed lvm2rescue on commandline
if [ "$rescue" = "YES" ]; then
lvm vgchange --ignorelockingfailure -P -a y
do_shell
else
lvm vgchange --ignorelockingfailure -a y
fi
for

echo "$PRE Activating LVM2 volumes"
lvm vgscan --ignorelockingfailure -a y

# run a shell if we're passed lvm2rescue on commandline
if [ "$rescue" = "YES" ]; then
lvm vgchange --ignorelockingfailure -P -a y
do_shell
else
lvm vgchange --ignorelockingfailure -a y
fi
And adding with --mknodes because Gentoo LVM2 guide mentions that if the installation has been interrupted, as is in my case many times, that need to be added using LiveCD. So I put it on the scripe as well.

echo "$PRE Activating LVM2 volumes"
lvm vgscan --mknodes --ignorelockingfailure -a y

# run a shell if we're passed lvm2rescue on commandline
if [ "$rescue" = "YES" ]; then
lvm vgchange --ignorelockingfailure -P -a y
do_shell
else
lvm vgchange --ignorelockingfailure -a y
fi
Finally I created swap with mkswap /dev/vg/swap. It gave me some error but then i did mkswap -f .... Now I have this message when boot and when activating swap partition...

BIT FAT WARNING!! Failed to translate "/dev/kewl/swap" into a device id.
This is the message when creating swap:

mkswap /dev/kewl/swap
Setting up swapspace version 1, size = 511700 kB
no label, UUID=(long number)
I can't put swap type with fdisk because I need to put as lvm2.

Thanks in advanced...

bye