[CentOS] Moving LVM from one machine to another

Sat Jan 9 13:17:11 UTC 2010
Stephen Harris <lists at spuddy.org>

On Fri, Jan 08, 2010 at 11:02:12PM -0500, Robert Heller wrote:
> At Fri, 8 Jan 2010 22:40:21 -0500 CentOS mailing list <centos at centos.org> wrote:
> > Now I've moved those 5 disks onto a CentOS5 machine and the RAID array
> > is being rebuilt.  However the LVM structures weren't detected at boot
> > time.  I was able to "vgscan" and 'vgchange -a y' to bring the volume
> > online and then fsck the logical volumes.
> > 
> > But I was concerned this didn't happen at boot time.  Do I need to do
> > anything else, or have the commands I've run done sufficient?
> > 
> > FWIW, this machine has no other LVM (nor RAID) disks on it.
> 
> This is why.  Unless the machine 'knows' to look for LVM (eg has the
> mumble mumble in /etc/lvm/), it wouldn't look for it during start up.  And
> unless it's root file system is on LVM its initrd won't have the
> "vgscan" and 'vgchange -a y' commands in the init script.

So what's the fix?  How do I get the right "mumble mumble"? :-)

Thanks!

> > (only 5 more hours for the rebuild to complete!)
> > 
> 
> And hopefully, you won't get a disk error in the those errors and lose
> the whole array.

   % cat /proc/mdstat
   Personalities : [raid6] [raid5] [raid4] 
   md3 : active raid5 sdf1[4] sde4[3] sdd3[2] sdc2[1] sdb1[0]
         3907039744 blocks level 5, 64k chunk, algorithm 2 [5/5] [UUUUU]
      
   unused devices: <none>

No problem :-)

-- 

rgds
Stephen