Using the standard upgrade proceedures, Debian Etch + LVM will fail to upgrade to Debian Lenny gracefully. This is due to the kernel modules and is simple to avoid.
- Before changing apt sources (They should be etch)
- apt-get update
- apt-get upgrade
- reboot if kernel upgrades
- Now change your apt sources (Lenny or Stable)
- apt-get update
- apt-get upgrade
- NOTE: At this point lvm2 is probably held back.
- Reboot if the kernel upgrades
- NOW do your dist upgrade
- apt-get update
- apt-get dist-upgrade
- NOTE: At this point lvm2 is probably still held back.
- Reboot
- apt-get update
- apt-get install lvm2
- Reboot
TADA! You have to reboot a couple times, but you never have to touch the configs or the mapper.
Did you find this post useful or have questions or comments? Please let me know!
4 responses so far ↓
1 doug // Feb 8, 2010 at 9:21 am
i’m close to upgrading my etch server to lenny, and i am very much affraid to do it just because of potential issues with lvm. sofar this has kept me from upgrading.
if i look at the release notes, no mention is made of issues with lvm.
i can not make backups of my disks, so i would be definately hosed if i can not get access to my disks after upgrading.
did u learn about the solution you describe yourself? can you mention any resources you used to document yourself before the upgrade?
thanks.
2 admin // Feb 8, 2010 at 10:56 am
First things first. You don’t have to upgrade LVM. The upgrader holds it back so if you do a dist-upgrade, LVM is not upgraded and your system will work fine.
If you want to upgrade LVM at a later date, simply follow steps 13-17.
I learned this through trial-and-error. When one of my servers came up and couldn’t load the LVM mapper, I pretty much freaked out. However, if LVM does break, your data is not gone. You can boot off an Etch CD and do a repair/recovery. You’ll get to rebuild your LVM maps.
After my fist major failure followed by repairing with the CD, I used the steps in the post successfully on a number of servers without problems. The key is to get all the way to Lenny BEFORE upgrading LVM.
3 doug // Feb 12, 2010 at 6:43 am
thanks for the advice!!
i’m going through lenny’s release notes, and i’ll add your notes to them.
4 pfbach // May 28, 2010 at 5:43 pm
Thanks, this saved me from a lot of trouble. Finally I could migrate my last server from etch to lenny, and LVM to LVM2 !!
Leave a Comment