Re: [CentOS] Removing LVM

2012-04-10 Thread James Pifer
On Tue, 2012-04-10 at 04:59 +0200, Markus Falb wrote:
 On 10.4.2012 02:42, James Pifer wrote:
  I have a CentOS 5 machine in which I'm trying to remove lvm. I dd'ed the
  file system to another partition, then dd'ed it back overwriting the lvm
  partition. I then modified menu.lst and fstab and replaced the paths to
  point to the correct device. 
  
  When the system boots it's still looking for lvm. I can restore the
  system back to where it was with lvm, but I'm not sure what step I'm
  missing to stop the system from looking for lvm. 
 
 Extract the initrd, edit the init script (I do not remember the name)
 and compress initrd again. I had to this some time ago after renaming a
 Volume Group. There is some lvm stuff hardcoded in this script.

Markus, 

Thank you for the suggestion. I'm very close, I think. I used the
instructions here for working with initrd's script:
http://www.thegeekstuff.com/2009/07/how-to-view-modify-and-recreate-initrd-img/

I'm still having a problem booting up. I can't seem to figure out what
the proper settings should be in initrd. When I boot I get:

.
Loading dmmemcache.ko module
Loading dmregion_hash.ko module
Loading dmmessage.ko module
Loading dmraid45.ko module
devicemapper: dmraid45: initialized v0.2594l
Waiting for driver initialization.
Scanning and configuring dmraid supported devices
Trying to resume from /dev/sda2
Unable to access resume device (/dev/sda2)
Creating root device.
Mounting root filesystem.
mount: could not find filesystem ’/dev/root’
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic  not syncing: Attempted to kill init!


Here are my relevant files:
fdisk -l
Disk /dev/sda: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders, total 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xea6c011f

   Device Boot  Start End  Blocks   Id  System
/dev/sda1   *  63  208844  104391   83  Linux
/dev/sda2  208845 4401809 2096482+  82  Linux swap / Solaris
/dev/sda3 44018104612261420860402+  83  Linux


fstab:
/dev/sda3   /   ext3defaults1 1
#LABEL=//   ext3defaults
1 1
LABEL=/boot /boot   ext3defaults1 2
tmpfs   /dev/shmtmpfs   defaults0 0
devpts  /dev/ptsdevpts  gid=5,mode=620  0 0
sysfs   /syssysfs   defaults0 0
proc/proc   procdefaults0 0
/dev/sda2   swapswapdefaults0 0


menu.lst:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this
file
# NOTICE:  You have a /boot partition.  This means that
#  all kernel and initrd paths are relative to /boot/, eg.
#  root (hd0,0)
#  kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#  initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/ces.xpm.gz
hiddenmenu
title CentOS (2.6.18-274.17.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-274.17.1.el5 ro root=/dev/sda3
initrd /initrd-2.6.18-274.17.1.el5.img
title CentOS (2.6.18-274.3.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-274.3.1.el5 ro root=/dev/sda3
initrd /initrd-2.6.18-274.3.1.el5.img
title Centreon Enterprise Server (2.6.18-194.3.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.3.1.el5 ro root=/dev/sda3
initrd /initrd-2.6.18-194.3.1.el5.img


initrd init:
#!/bin/nash

mount -t proc /proc /proc
setquiet
echo Mounting proc filesystem
echo Mounting sysfs filesystem
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 /dev/pts /dev/pts
mkdir /dev/shm
mkdir /dev/mapper
echo Creating initial device nodes
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/urandom c 1 9
mknod /dev/systty c 4 0
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/rtc c 10 135
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4
mknod /dev/tty5 c 4 5
mknod /dev/tty6 c 4 6
mknod /dev/tty7 c 4 7
mknod /dev/tty8 c 4 8
mknod /dev/tty9 c 4 9
mknod /dev/tty10 c 4 10
mknod /dev/tty11 c 4 11
mknod /dev/tty12 c 4 12

Re: [CentOS] Removing LVM

2012-04-09 Thread Markus Falb
On 10.4.2012 02:42, James Pifer wrote:
 I have a CentOS 5 machine in which I'm trying to remove lvm. I dd'ed the
 file system to another partition, then dd'ed it back overwriting the lvm
 partition. I then modified menu.lst and fstab and replaced the paths to
 point to the correct device. 
 
 When the system boots it's still looking for lvm. I can restore the
 system back to where it was with lvm, but I'm not sure what step I'm
 missing to stop the system from looking for lvm. 

Extract the initrd, edit the init script (I do not remember the name)
and compress initrd again. I had to this some time ago after renaming a
Volume Group. There is some lvm stuff hardcoded in this script.
-- 
Kind Regards, Markus Falb



signature.asc
Description: OpenPGP digital signature
___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Removing LVM

2012-04-09 Thread Mike Burger
 I have a CentOS 5 machine in which I'm trying to remove lvm. I dd'ed the
 file system to another partition, then dd'ed it back overwriting the lvm
 partition. I then modified menu.lst and fstab and replaced the paths to
 point to the correct device.

 When the system boots it's still looking for lvm. I can restore the
 system back to where it was with lvm, but I'm not sure what step I'm
 missing to stop the system from looking for lvm.

 I started following this url:
 http://daniel-albuschat.blogspot.com/2008/02/converting-lvm-to-normal-partition.html

 Any suggestions?

 Thanks,
 James

James,

From what you've written above, I don't see where you removed the LVs or
the physical volumes from the LVM setup, using the LVM tools. If you want
to remove the disk from LVM, that would be the proper way to go about
doing so.

-- 
Mike Burger
http://www.bubbanfriends.org

Visit the Dog Pound II BBS
telnet://dogpound2.citadel.org http://dogpound2.citadel.org
https://dogpound2.citadel.org

To be notified of updates to the web site, visit:

https://www.bubbanfriends.org/mailman/listinfo/site-update

or send a blank email to:

site-update-subscr...@bubbanfriends.org


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos