Skip to contentSkip to conversation

vgscan and initrd

linux-lvm [email protected] 2 participants 2 messages Jun 26, 2003

lore
Share & tools
lore
#0 lore raw

Hi, I come seeking sage advice :)

Anyways, I've been busy installing a new Linux system using Gentoo. I am running this on a spare box, Duron 800 w 300mb, with the harddisk connected to the Promise ATA 100 onboard controller as /dev/hde8.

Al goes well, and I create the following partitions

/dev/hde6      swap
/dev/hde7      ext3 fs     /boot
/dev/hde8      lvm

I also create the pv on /dev/hde8 and a logical volume at /dev/lv/ide

/dev/lv/ide is my /

From my running livecd I then chroot'ed into /dev/lv/ide, and then the troubles began. When I run vgscan when chroot'ed it doesn't find any volume groups. When I run vgchange, i claims that the VDGA record doesn't match the kernel, and urges me to run vgscan, running vgscan doesn't solve this problem since it doesn't find the volume groups.

ls -l /dev/lv/ide shows me that my volume group indeed doesn't excist. However, the mount command shows me that /dev/lv/ide is mounted at root. So in summary, I can't find the volumegroup, even tough I am working on/in it.

I decided to go ahead anyways, and created a initrd using lvmcreate_initrd (based on the kernel i made, 2.4.21 ) it does this, and when I boot it loads this initrd as it is supposed to. It neatly finds my /dev/hda and /dev/hdb cdroms, and once insmod'ed it also find /dev/hde, but the it runs vgscan and finds no volumegroups, that causes vgchange to not find anything either. That causes the kernel to panic, since it cannot find root.

Weird thing is, if I boot with any other rescue/livecd, such as SuSE rescue, knoppix or gentoo live cd, I can vgscan and vgchange -ay to find my volume group and logical volume. But once chroot'ed or booting to my new system, I cannot and will not find it.

Does anyone have any suggestions on why vgscan doesn't find anything and how to solve this ?

Many thanx in advance, I have been strugling with this one for almost a week now, and I am out of options. I have been able to install lvm as root on quite a few systems before, including a LFS system, but right now, I am stumped.

best regards
Mark

When I boot from a livecd image, such as

#1 lore raw

Sounds like what I ran into not long ago. (FAQ material?) My VG was so large that vgscan wanted to write out backup info. that was larger than the free space in the initrd that Red Hat had set up. It was suggested to mount a tmpfs volume over /etc, and meanwhile I have been recreating the initrd image leaving enough space to allow vgscan to run.

vgscan won't actually say it ran out of storage, but that's what was happening here.

Signature · 2 lines
Mark H. Wood, Lead System Programmer   [email protected]
MS Windows *is* user-friendly, but only for certain values of "user".