lvrename of root lv issue

General support questions including new installations
Post Reply
chattr
Posts: 76
Joined: 2006/01/27 09:54:28

lvrename of root lv issue

Post by chattr » 2007/02/14 12:23:43

I am seeing the following issue when I rename the LV containing the root filesystem on a SCSI disk within a vmware server guest:

1. lvrename works ok.
2. I can confirm new LV names with lvscan.
3. mkinitrd -f /boot/initrd-xxx.img `uname -r`.
4. Update /etc/fstab with NEW_LV entry.
5. When I reboot I get the following errors:

...
Loading dm-mod.ko module
device-mapper: 4.5.0 - ioctl (2005-10-04) initialised: dm-devel@redhat.com
Loading jbd.ko module
Loading ext3.ko module
Loading dm-mirror.ko module
Loading dm-zero.ko module
Loading dm-snapshot.ko module
Creating root device
Mounting root filesystem
mount: error 6 mounting ext3
mount: error 2 mounting none
Switching to new root
switchroot: mount failed: 22
umount /initrd/dev failed: 2
Kernel Panic - not syncing: attempted to kill init!

6. When I boot linux rescue using CD1, and run an 'lvm vgscan' and 'lvm lvscan', I see that LVM sees the new names rather than the old ones.
7. When I mount /dev/VG/NEW_LV /a and run 'df -h', I see the correct LV name in the df output.
8. When I run a chroot to the mounted /, I see that a df produces an output containing the old LV name.

I have looked in the initrd entry and I don't see any reference to LV names explicitly.
I have repeated the above without running the mkinitrd (and using the stock one).

When I change the LV name back to the old one, update fstab and reboot, the server comes back ok.

Help please !?

User avatar
WhatsHisName
Posts: 1547
Joined: 2005/12/19 20:21:43
Location: /earth/usa/nj

Re: lvrename of root lv issue

Post by WhatsHisName » 2007/02/14 14:15:50

In a traditional installation, your problem can be fixed by booting into rescue mode, search/mount/chroot and then remaking the initrd images (see mkinitrd), provided no problems are encountered during the mount step.

chattr
Posts: 76
Joined: 2006/01/27 09:54:28

Re: lvrename of root lv issue

Post by chattr » 2007/02/14 14:44:44

I have tried that, and I get the same issue with LVM seeing the lv with the new name but the OS seeing the old name still. Hence a panic on boot because it can't find /.

pjwelsh
Posts: 2620
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: lvrename of root lv issue

Post by pjwelsh » 2007/02/14 15:58:27

Please verify that the /etc/fstab has the correct new path.

chattr
Posts: 76
Joined: 2006/01/27 09:54:28

Re: lvrename of root lv issue

Post by chattr » 2007/02/14 17:09:06

/etc/fstab does have the new path.


I don't understand why the LVM reports the new name, but when you do a chroot df reports the old name.

I think this is what is causing the kernel panic on reboot.

Post Reply

Return to “CentOS 4 - General Support”