Skip to contentSkip to conversation

Problems after upgrading LVM

linux-lvm Klaus Agnoletti 6 participants 10 messages Dec 3, 2001 – Dec 12, 2001

lore
Share & tools
lore
#0 lore raw

Hi,

I recently updated from linux 2.4.6 to 2.4.13-ac8, from LVM 0.9something to 1.0.1rc4.
I am using debian, so I grabbed the two packages - lvm10 and lvm-common.

Something must be wrong though, cause I can't mount my LVM anymore.

This is what happens :

Vault:~# mount /glftpd/site
mount: /dev/site_vg/lvol1 is not a valid block device
Vault:~# pvscan
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- inactive PV "/dev/hda8"  is associated to an unknown VG (run
vgscan)
pvscan -- inactive PV "/dev/hdb1"  is associated to an unknown VG (run
vgscan)
pvscan -- total: 2 [71.35 GB] / in use: 2 [71.35 GB] / in no VG: 0 [0]
Vault:~# vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume
group
Vault:~# vgcfgrestore -n site_vg /dev/hdb1
vgcfgrestore -- ERROR: different structure size stored in
"/etc/lvmconf/site_vg.conf" than expected in file vg_cfgrestore.c [line
139]
vgcfgrestore -- ERROR "vg_cfgrestore(): read" restoring volume group
"site_vg"
Vault:~# vgchange -ay
vgchange -- no volume groups found

What's the matter ? Is it a problem that can be fixed by uuid_fixer ?

Thanks in advance,

Klaus

#1 lore raw
Quoted 5 lines · Klaus Agnoletti

Hi,
I recently updated from linux 2.4.6 to 2.4.13-ac8, from LVM 0.9something to 1.0.1rc4.
I am using debian, so I grabbed the two packages - lvm10 and lvm-common. Something must be wrong though, cause I can't mount my LVM anymore.

2.4.13-ac8 is no good on Intel, regress to ac7.

I had some problems with ac8, and asked about it on the linux-kernel mailing list and was told by about 96G people that it was bad.

I don't know if this is your problem.

Quoted 40 lines

This is what happens :

Vault:~# mount /glftpd/site
mount: /dev/site_vg/lvol1 is not a valid block device
Vault:~# pvscan
pvscan -- reading all physical volumes (this may take a while...)
pvscan -- inactive PV "/dev/hda8"  is associated to an unknown VG (run
vgscan)
pvscan -- inactive PV "/dev/hdb1"  is associated to an unknown VG (run
vgscan)
pvscan -- total: 2 [71.35 GB] / in use: 2 [71.35 GB] / in no VG: 0 [0]
Vault:~# vgscan
vgscan -- reading all physical volumes (this may take a while...)
vgscan -- "/etc/lvmtab" and "/etc/lvmtab.d" successfully created
vgscan -- WARNING: This program does not do a VGDA backup of your volume
group
Vault:~# vgcfgrestore -n site_vg /dev/hdb1
vgcfgrestore -- ERROR: different structure size stored in
"/etc/lvmconf/site_vg.conf" than expected in file vg_cfgrestore.c [line
139]
vgcfgrestore -- ERROR "vg_cfgrestore(): read" restoring volume group
"site_vg"
Vault:~# vgchange -ay
vgchange -- no volume groups found

What's the matter ? Is it a problem that can be fixed by uuid_fixer ?

Thanks in advance,

Klaus

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

Signature · 1 line
Share and Enjoy. 
#2 lore raw
Quoted 2 lines

2.4.13-ac8 is no good on Intel, regress to ac7.

I have no idea if this is the case either.
I have no experience in upgrading LVM before, as far as I've been able to read from the documentation, it should't be a problem - so I really have no idea.

It came out rather unclear in my last mail, but I am using the lvm10 and lvm-common deb packages.

I hope anybody can give me a clear answer on this - It's no problem for me to regress to 2.4.13-ac7, but I would like to be sure that it would solve my problem in advance.

Thanks,

/Klaus

#3 lore raw

I got my problem solved.
It seems like I can't restore a vg created with an older version of LVM than the one I am currently using.
This means that VGs in my stup created with LVM 0.9 can't be restored after upgrading to 1.0.1.
Is this a bug ? (I would say yes) - if not, what is the correct procedure to get your VG up and running after an update ?

I tried doing a
vgcfgrestore -n vg_name /dev/hdXX (for each pertitions in the VG) vgchange -ay

And after that just a regular mount.

After this discovery, my setup is debian linux with kernel 2.4.16 (which has lvm 1.0.1rc4) and the tools for lvm 0.9 which I originally created the vg with) - to me this sounds rather weird.

What did I miss ?

Thanks,

Klaus Pedersen

#4 lore raw

Hello,
try to use uuid_fixer on every pv you have in your vg. Then do a "vgcfgrestore -n your_vgname -l" and if this works a "vgcfgrestore -n vg_name /dev/hdXX (for each pertitions in the VG)". Run vgscan again, then vgchange -ay. I think this should work. I prefered it to run vgcfgbackup after it´s done.
Btw, this was discussed the last mouth several time on this list, searching in the archive would have been helped you. :) Regards
Uli

Quoted 32 lines · Klaus Agnoletti

I got my problem solved.
It seems like I can't restore a vg created with an older version of LVM than the one I am currently using.
This means that VGs in my stup created with LVM 0.9 can't be restored after upgrading to 1.0.1.
Is this a bug ? (I would say yes) - if not, what is the correct procedure to get your VG up and running after an update ?

I tried doing a
vgcfgrestore -n vg_name /dev/hdXX (for each pertitions in the VG) vgchange -ay

And after that just a regular mount.

After this discovery, my setup is debian linux with kernel 2.4.16 (which has lvm 1.0.1rc4) and the tools for lvm 0.9 which I originally created the vg with) - to me this sounds rather weird.

What did I miss ?

Thanks,

Klaus Pedersen

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html

Signature · 1 line
'The box said, 'Requires Windows 95 or better', so i installed Linux - TKK 5
#5 lore raw

[linux-lvm] reinstall system with volumes intact?

Ok,
I want to reinstall my server from mandrake 8.0 to mandrake 8.1

I have some logical volumes which I don't want to touch during the reinstall (they mount under /vol)
I don't want to have to restore the data to them, I want to be able to reboot the server, do the reinstall and tell it where to mount the volumes and then have all my data still there and in the right places when the new system comes up.

The rest of the partitions are going to be rearranged.

The question is;
Do I have to do anything special to have these volumes accessible under the new system? Mandrake seems to detect LVM at install time and comes with some nice install-time tools to set them up.

However, I'm a little concerned with all the export, import stuff that I read about; should I export the VG before the reinstall? Or what?

Or am I just unecessarily paranoid and LVM will see the old volumes on the new system?

#6 lore raw

[linux-lvm] reinstall, import, export question

In reply to Ulrich Wiederhold

I'd really like to do a reinstall of my main server Real Soon Now, but I'm concerned about the LVM side of things.

I have a bunch of logical volumes on the system, none are essential, its all data. Its backed up but I don't want to have to wipe it and restore it.

I want to be able to simply reinstall the system and carry the physical volumes, and the VG's and LV's they hold over to the rebuilt system.

About the only references to anything like this in the docco is about exporting to a different system.

Is this really necessary for my purposes? Or can I expect that when the new system comes up, the LVM subsystem will find the old volumes nicely?

#7 lore raw

Re: [linux-lvm] reinstall, import, export question

-- Steve Wray <[email protected]>

Quoted 12 lines

I'd really like to do a reinstall of my main server Real Soon Now, but I'm concerned about the LVM side of things.

I have a bunch of logical volumes on the system, none are essential, its all data. Its backed up but I don't want to have to wipe it and restore it.

I want to be able to simply reinstall the system and carry the physical volumes, and the VG's and LV's they hold over to the rebuilt system.

Quoted 6 lines

About the only references to anything like this in the docco is about exporting to a different system.

Is this really necessary for my purposes? Or can I expect that when the new system comes up, the LVM subsystem will find the old volumes nicely?

So long has you have complete backups go for it :-)

You might wan tot consider exporting the volumes then re-importing them onto the new system after the install is complete. This avoids the installation cycle accidentally blowing off the lv's.

--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647

                                           +1 800 762 1582
#8 lore raw

Re: [linux-lvm] reinstall, import, export question

In reply to Steve Wray
Quoted 3 lines

I want to be able to simply reinstall the system
and carry the physical volumes, and the VG's and
LV's they hold over to the rebuilt system.

I just finished doing this.
I installed a new python version from source which torched all my printing in RH7. So instead of reinstalling the RPM I decided to wipe the OS and do a fresh install. Here is my setup.

OLD:
hda held "/" on ext2
hdb held /home, /usr, /root, /var on LVM with reiserfs

NEW:
hda holds "/" on ext3
hdb holds /home, /usr, /root, /var on LVM with reiserfs

I might miss a step but will try not to.

1. Back up all /etc/lvm* files and dirs. (I don't think this is neccessary since vgscan rebuilds them I think but I did it anyway)
2. Install fresh OS or upgrade.
3. Download latest kernel (I used 2.4.16). Of course you could use theirs but if you are going to build a kernel get the latest stable one there is.
4. Enable proper kernel options (in my case LVM, ext3, reiserfs)
5. make dep clean bzImage modules modules_install
6. Make sure you have boot disk of old kernel.
7. make changes to grub or lilo for new kernel
8. reboot
9. make dirs to mount LVM on and copy back the /etc/lvm* stuff from backup. (again, may not be neccessary)
10. Get and install the lvm utilities from Sistina
11. run pvscan to see if the "inactive" pv is recognized
12. run vgscan, then vgchange -a y
13. run lvscan to make sure all went as expected
14. mount all to the dirs you created. In my case something like:
mount -t reiserfs /dev/main/lvhome /mnt/lvhome
15. scan them and read/write them to make sure you get no fs errors
16. make sure vgscan, vgchange -a y is in startup and vgchange -a n is in shutdown
17. make changes to fstab to mount the dirs to the correct places
18. double check above
19. reboot

Of course You know most all of that I am sure but it is easier for me to lay it out that way. If you don't have a "dedicated" LVM disk as I do That will most surely complicate things if the OS doesn't support an upgrade or install of LVM. I know RH and deb don't. (the two I use) I have seen on the list that suse and another do. This worked for me at least.

Hope I didn't forget anything major.

Signature · 5 lines
Lewis Bergman
Texas Communications
4309 Maple St.
Abilene, TX 79602-8044
915-695-6962 ext 115
#9 lore raw

RE: [linux-lvm] reinstall, import, export question

Quoted 9 lines

From: [email protected] [mailto:[email protected]]On Behalf Of Lewis Bergman

Quoted 3 lines

I want to be able to simply reinstall the system
and carry the physical volumes, and the VG's and
LV's they hold over to the rebuilt system.

I just finished doing this.
I installed a new python version from source which torched all my printing in RH7. So instead of reinstalling the RPM I decided to wipe the

OS and do a

Quoted 2 lines

fresh install. Here is my setup.

[snip]

Quoted 3 lines

Of course You know most all of that I am sure but it is easier for me to lay it out that way.

Nice and methodical!
:)

Quoted 1 line

If you don't have a "dedicated" LVM disk as I do

yeah I have 2 disks on seperate IDE controllers that I use for LVM. The system partitions are still on normal partitions and on one drive.

Quoted 2 lines

That will most surely complicate things if the OS doesn't support an upgrade or install of LVM. I know RH and deb don't. (the two I use) I have

seen on

Quoted 1 line

the list that suse and another do. This worked for me at least.

Mandrake seems to do it well; I set these volumes up at install time. I have this feeling that I'll be able to reintegrate my volumes at reinstall time too, but I wanted to clarify the export/import thing wondering if it was essential.

Quoted 14 lines

Hope I didn't forget anything major.
--
Lewis Bergman
Texas Communications
4309 Maple St.
Abilene, TX 79602-8044
915-695-6962 ext 115

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html