Configure LVM to gain access to the data on disks

Hello friends,

We had to upgrade RHEL 4.x to 5.7 so we took complete backup. Since DIRECT UPGRADE not possible, we rebuilt 5.7 from scratch.

We had lvm configuration on DATA disks in previous OS and now we need to configure such that we should be able to have same old LVM configuration (like VGs and LVs etc.) so that we could access the data on those volumes.

Could any kind soul provide me step-by-step on how to do this? (Yes, I have backup of /etc/lvm etc. of previous OS).

I thought of just copying Old /etc/lvm into new one and start lvm daemon. will it work?

TIA

Typically you only need to worry about /etc/lvm if you're doing something super special like tagging or filtering. How were the volumes presented before? If they were on SAN LUN's or something you should be able to see the same logical volumes in the output of "lvs". Basically, if everything else is working how it should there isn't anything you should HAVE to do for the LVM portion, it should just work.

The most likely culprits are:

1) The LUN's aren't being presented to the system at all. I would do a "ls -l /dev/disk/by-path" to see if you can see all the volumes you're expecting to see on the system.

2) If the volumes acting as the physical volumes are indeed there, check to see if there's an LVM filter in place. If there's pathing to the same volume (like in switch fibre channel, for instance) admins will configure lvm to skip certain volumes so they don't constantly see annoying messages about duplicate volumes and they can be sure LVM is fault tolerant. If the volumes are being filtered out because they're restricting to a pathing solution that hasn't been set up yet, that could also cause your issue.

3) If they're iSCSI LUN's you may have to log into the target so that it maps the LUN's to block devices and so gives LVM something to look at (you'll have to manually tell it to pvscan after the LUN's are presented, though).

etc, etc. There's an almost infinite number of permutations on what could be happening but the above should give you an indication of what lower-level stuff could cause LVM to stop working if the lower level system failed.