On Sun, 2008-07-06 at 11:04 -0400, Filipe Brandenburger wrote:
Hi,
On Sun, Jul 6, 2008 at 6:36 AM, William L. Maltby CentOS4Bill@triad.rr.com wrote:
If it's a boot drive, remember to rebuild your initrd and modify the init file to ignore lvm lock failures with the new VG name. Otherwise you'll be fighting some more battles.
Yes, I remember getting burned by this once.
Man gzip and cpio in case I misremember.
To set the "ignorelockingfailure" and others on the initrd file, can't you just use "mkinitrd"? I was looking into the /sbin/mkinitrd script (on CentOS 5.2), and I saw that it contains code for that, for instance:
if [ -n "$vg_list" ]; then emit "echo Scanning logical volumes" emit "lvm vgscan --ignorelockingfailure" emit "echo Activating logical volumes" emit "lvm vgchange -ay --ignorelockingfailure $vg_list" fi
I just don't know if vg_list will be populated with the right devices. Anyway, it might be worth a try, specially if you want to do that over and over again, messing with the internals of initrd (gzip, cpio, etc., and specially rebuilding it) is not something you would want to do on a daily basis.
He is trying to copy an existing install, transport the drive and boot. Until he gets a boot that allows the new root to be detected *as* the new root, I don't know if that would work. But as I frequently say, I'm not expert at any of this stuff.
However, I can tell you that this lets me keep a fallback on a second drive in case the first fails or gets scrogged by you-know-who. It is tested and works. 1. Change BIOS boot sequence *if* required 2. Root file system on 2nd drive is VolGroupAA 3. Punch magic button. 4. Back in business.
HTH, Filipe
<snip>