LVM Breaks When Upgrading Debian Etch to Lenny 4.x to 5.0

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.

  1. Before changing apt sources (They should be etch)
  2. apt-get update
  3. apt-get upgrade
  4. reboot if kernel upgrades
  5. Now change your apt sources  (Lenny or Stable)
  6. apt-get update
  7. apt-get upgrade
  8. NOTE: At this point lvm2 is probably held back.
  9. Reboot if the kernel upgrades
  10. NOW do your dist upgrade
  11. apt-get update
  12. apt-get dist-upgrade
  13. NOTE: At this point lvm2 is probably still held back.
  14. Reboot
  15. apt-get update
  16. apt-get install lvm2
  17. 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!

This entry was posted in Debian, How Tos, LVM. Bookmark the permalink.

4 Responses to LVM Breaks When Upgrading Debian Etch to Lenny 4.x to 5.0

  1. doug says:

    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 says:

    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 says:

    thanks for the advice!!

    i’m going through lenny’s release notes, and i’ll add your notes to them.

  4. pfbach says:

    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 Reply

Your email address will not be published. Required fields are marked *