Trying to convert a LVM partition to non-LVM

Styma, Robert E (Robert) robert.styma at alcatel-lucent.com
Mon Mar 1 16:18:55 UTC 2010


I was working on a linux box which had a failing disk over
the weekend.  It still booted, but flagged smartd errors
and had a couple of damaged files which were fortunately
replaceable (eclipse install tgz).

I booted Spinrite to make the drive readable and then planned
to use system rescue CD and gparted to copy to an identical
drive.  Unfortunately, the machine used the default boot
partition (ext3) and LVM for the root and swap partitions.
gpartd cannot currently deal with LVM partitions.  This is
too bad as it is a great tool.

I initially tried laying out the partitions without LVM and
tar copying the root partition over.  The /boot partition had
gone across with gpartd.  I changed the grub.conf file and
the /etc/fstab file and even the /etc/mtab file.  In each
case, the system would start to boot and then the kernel would
panic looking for the logical volumes.

In the end, I just laid out the partitions to match the original
drive and dd'ed both physical partitions to the new drive and it
worked.

My question becomes, "What file(s) other than fstab and grub.conf
need to change to change the root parttion from an LVM parition
to a normal ext partition such as sda2?"

I feel like I am close, but no cigar

Bob Styma


More information about the users mailing list