[CentOS] Hosed my software RAID/LVM setup somehow

Wed Oct 17 16:20:02 UTC 2007
Luciano Rocha <strange at nsk.no-ip.org>

On Wed, Oct 17, 2007 at 06:06:52PM +0200, Kai Schaetzl wrote:
> Luciano Rocha wrote on Wed, 17 Oct 2007 16:08:31 +0100:
> 
> > mount uses /etc/mtab for displaying current mounts, which is invalid
> > when starting the boot. Check /proc/mounts for the correct values.
> > 
> > You can switch to rw with:
> > mount / -o remount,rw
> > 
> > And then you'll be able to change fstab.
> 
> Yeah, this worked, thanks. I'll write that down :-)
> It would be nice if the system would ignore the problems with md2 and md3 and 
> boot nevertheless as in this case it would have been harmless.
> 
> > the b option to init/boot boots in emergency mode.
> 
> If needed, where would I do that? Can I do an init -b 3 in the repair shell or 
> where would I do this?

In the bootloader (grub, lilo, syslinux). When selecting what to boot,
append the option to the kernel options (-b for emergency boot, 1 or s
for single user mode, init=/bin/bash to use bash as init).

In grub, you can edit entries with key 'e', and append directly (if not
booting Xen) with key 'a'.

> 
> > Seems to be OK. What is happening is that you're telling the system to
> > check the filesystems that where in the MDs in fstab. As there's none
> > (it's lvm now), the boot process complains and drops you to a shell.
> 
> Indeed. I thought that using LVM manager would make the necessary changes 
> (whatever they were) for me. I always avoided LVM as much as I could until 
> recently and when I used it I did that already during installation. This was 
> the first time I changed this stuff on a running system. I learned something 
> today :-) I added the /dev/mapper entries as mounts to fstab now and remounted 
> all and everything is well. Thanks for the quick help!
> 
> I have a small question, though: one of the LVM partitions is used for a 
> (non-active) Xen VM and I cannot mount that as ext3. I know I have to unmount 
> before I can run the VM on it. I want to have a look in it. Is there a way to 
> mount it? xdva isn't recognized as a filesystem.

Mount outside the VM? The disks created under RHEL 5/Centos 5/Fedora 7
have partitions inside, you'll have to use kpartx to create local
partitions pointing to the correct areas in the image.

kpartx -va /dev/mapper/... should do that, see the manual page for more
details (man kpartx).

-- 
lfr
0/0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20071017/5c7556b5/attachment-0005.sig>