You are not logged in.

#1 2011-07-27 02:02:14

badhat
Member
Registered: 2011-01-30
Posts: 112

[SOLVED] LVM2 Installation -- volume initialization issue

I want to set up my system with LVM. The first time around I followed the Wiki and when I rebooted I got error 15 in Grub (basically, no file was found).  The wiki says to do

# mkinitcpio -g /boot/kernel26.img

but I could not complete this step as the file did exist... there was only Grub and some other directories in /boot.  Perhaps this is because I installed Grub to /dev/sda1 instead of to /dev/sda?  (The LVM group was on /dev/sda2)

After the Error 15 in Grub, I tried starting from scratch. Now, when I try to do

# pvcreate /dev/sda2

I get an error

Can't initialize physical volume "/dev/sda2" of volume group "VolGroup00" without -ff

I've tried

#dd if=/dev/zero of=/dev/sda bs=1k count=1

but dd seems to complete instantly, which makes me wonder if it is doing anything at all.  And, of course, I still get the error about initialization if I try to recreate the LVM.

Last edited by badhat (2011-07-28 23:19:00)

Offline

#2 2011-07-28 02:04:12

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: [SOLVED] LVM2 Installation -- volume initialization issue

dd seems to complete instantly

Of course it is, you're only asking it to write 1kB.

Offline

#3 2011-07-28 16:28:56

badhat
Member
Registered: 2011-01-30
Posts: 112

Re: [SOLVED] LVM2 Installation -- volume initialization issue

Is there a reason why the pvcreate program still sees VolGroup00?  I've reformatted the disk with cfdisk and fdisk, wrote changes, and rebooted, but the old volume group remains.

Offline

#4 2011-07-28 16:44:54

MoonSwan
Member
From: Great White North
Registered: 2008-01-23
Posts: 881

Re: [SOLVED] LVM2 Installation -- volume initialization issue

I had this happen once and the only way I found to get rid of the old volgroup was to forcefully remove it with

vgremove -f volgroup000

You may need to remove the logical volumes you made before doing the volume group and then the physical volume.  You have to do them in order, backwards, from how you made them in the first place.  Sounds complicated but it's not that bad.  smile

Offline

#5 2011-07-28 23:18:42

badhat
Member
Registered: 2011-01-30
Posts: 112

Re: [SOLVED] LVM2 Installation -- volume initialization issue

That worked. And I have LVM working now.

Offline

Board footer

Powered by FluxBB