-   Linux - Server (
-   -   Migrating RAID5 and LVM from one distribution to another (

kleptophobiac 11-17-2009 12:41 AM

Migrating RAID5 and LVM from one distribution to another
I'm switching from Arch Linux to Ubuntu for a computer in my basement. It's been a few years since I've lived in the house and I want to leave the computer functioning as a server, but also with desktop capabilities well matched to a less-than-knowledgeable family.

So I installed Ubuntu 9.10 on my machine and got all of the hardware working without much issue. Now I have to get it to recognize the RAID5 + LVM that I had working under Arch. mdadm has no trouble finding the array, but it's not doing so well reading the partition table correctly. It thinks that it has partitions when in reality it does not. It has just the lvm physical volume metadata. It thinks there's a single generic "linux" 1TB partition.

That also means that pvscan isn't getting terribly far when it tries to find my physical devices.

I honestly have no idea why this would be the case and would love to hear from filesystem / software raid experts to understand what's going on.

Thanks for your help!

chrism01 11-18-2009 02:36 AM

Maybe a version issue? If the orig LVM is a few yrs old, it might be v1, whereas modern distros have V2
I seem to remember reading a recommendation that even if you've got the whole physical partition as 1 pv, it's still recommended to set it up as a proper partition.

kleptophobiac 11-18-2009 05:39 AM

Hmm, I probably should have made a partition for it. I'm going to go out on a limb and say I can't retroactively do that without screwing around with the partitioning. I can probably degrade the array, create a new volume group, and slowly move files around until I can eliminate the old group and the old PV. Think that's a good plan?

It's definitely LVM2 on Arch Linux. It's not a terribly old installation - about two years. AL tends to be a fairly bleeding edge distribution, which is part of why I'm migrating away from it. That was great when I had fewer responsibilities and could dedicate more time to screwing around with my computers. These days, however, I have college work, a job, and a girlfriend. I find that I want something less bleeding edge, friendlier to leave with my parents back home, and easier to leave alone for long stretches of time.

Thanks for the help!

chrism01 11-18-2009 06:51 PM

Personally, I'd take the simple approach; backup and redo the pvs from scratch. Quick/simple and it'll help you remove cruft.
Sounds like you ought to do a few backups if you want to be hands off anyway.
I'm pretty sure about that recommendation, just can't find the ref right now.

vishesh 11-18-2009 11:04 PM

May be vgexport and vgimport command help you.


All times are GMT -5. The time now is 04:05 PM.