[CentOS] "Can't find root device" with lvm root after moving drive on CentOS 6.3

Sun Mar 24 01:24:22 UTC 2013
Joakim Ziegler <joakim at terminalmx.com>

Oh, and the exact Dracut error I get is:

dracut Warning: No root device "block:/dev/mapper/vg_resolve02-lv_root" 
found


dracut Warning: LVM vg_resolve02/lv_root not found


But then:

# lvm vgscan


Found volume group "vg_resolve02" using metadata type lvm2

# lvm vgchange -ay

1 logical volume(s) in volume group "vg_resolve02" now active


# ls /dev/mapper

control   vg_resolve02-lv_root

# ln -s /dev/mapper/vg_resolve02-lv_root /dev/root

ln: creating symbolic link "/dev/root": File exists

# ls -l /dev/root

/dev/root -> dm-0

# rm /dev/root
# ln -s /dev/mapper/vg_resolve02-lv_root /dev/root
# exit

And everything boots normally.

Apologies if there are minor mistakes or omissions in this text. Since I 
can't copy/paste, I've transcribed it, excluding some parts, like the 
permissions of the symlink in the ls output. I have, however, double 
checked the important parts, like the names of devices and files.


-- 
Joakim Ziegler  -  Supervisor de postproducción  -  Terminal
joakim at terminalmx.com   -   044 55 2971 8514   -   5264 0864

On 23/03/13 18:55, Joakim Ziegler wrote:
> Grub (in the menu) has the following commands:
>
> root (hd0,1)
>
> kernel /vmlinuz-2.6.32-279.el6.x86_64 ro
> root=/dev/mapper/vg_resolve02-lv_root rd_NO_LUKS LANG=en.US.UTF-8
> rd_NO_MD crashkernel=128M rd_LVM_LV=vg_resolve02/lv_root
> SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb
> quiet pcie_aspm=off
>
> When I successfully booted manually, I removed "rhgb quiet" and added
> "rdshell" to that line.
>
> To the best of my memory, that line is stock, I don't recall ever
> changing it permanently.
>
> The names of the volume group and logical volume in that line correspond
> to my actual root device.
>