I have cloned my hdd 20gb to an 80gb drive using dd.
After testing to see if the cloning works, the system boots normally and from what I have seen my fedora appears to be working normally.

The problem that I am seeing is that my cloned drive is showing partitioned hda1 for boot and hda2 as linux LVM but not the full 80gb.

I had a look at the partitions through LVM and it shows Unintialized entities.

After doing an fdisk -l I see that /dev/hda2 ends at 2246 instead of 9964, and that the blocks are shown as 17936572+ instead of 61994835.
It also states that a disk /dev/dm-0 has an invalid partition table and shows /dev/dm-1 with 2013 MB and an invalid partition table.
Also, hda1 - boot is shown as linux ext3 type 83 whereas hda2 is shown as linux LVM type 8e.

I realize that the disk should be initialized but am not sure how to proceed. (Initialize first or simply extend by using fdisk to change parameters.)

Is it wise and normal to fdisk or cfdisk and change the drive spec and what should I change to be safe?

I also have QTParted installed as part of my previous system as well as LVM - logical volume management.

Peter

saikee

10-13-2007 09:02 AM

This is not going to be music to your ears!

You have achieved exactly what cloning is supposed to deliver; a mirror image of your original disk occupying exactly 20Gb, bootable and work exactly same as before. So move on and don't blame the cloning.

You next step is to use the unallocated empty space between the 21Gb to the 80th Gb in the hard disk.

You can do so by creating up to 15 partitions with the empty space. cfdisk and fdisk are OK for such task.

If you stick with the existing two partition arrangement you have to resize the partition boundary. That is a specialist's job.

Gaparted and Parted Magic, both available in Live CD, are the standard tools to resize Linux and PC hard disk partitions.

The bad news is, AFAIK, they do not support LVM, meaning they can resize a fat16/32, ntfs, ext2/3 reiserfs but not a LVM partition.

Don't use LVM myself. I suppose experts in LVM can give you advice what to do in your situation.

pixellany

10-13-2007 09:06 AM

When you clone in this way, the partition table is set up for a 20GB drive. Fixing it depends on what the partition layout is.

Please post the full output of "fdisk -l"

EDIT: Me type slow--Saikee is more knowledgeable on these things---also I missed that is was set up for LVM

peterb

10-13-2007 09:16 AM

Wow, I am surprised to see this info but I am positive that it will work out. I was thinking that it might just be a matter of initializing and then splicing the 2nd and 3rd parts together.

Saikee is more knowledgeable on these things---also I missed that is was set up for LVM

Kind word from pixellany to a thicko who doesn't understand a LVM.

pixellany

10-13-2007 09:37 AM

OK--I'm afraid I'm a thicko too. (at least in re LVM)

I'm also lazy---I would simply backup important data and then do a clean install on the new disk. (and no LVM--I never install things that I dont understand)

peterb

10-13-2007 10:01 AM

Well, I have just finished searching for info in the forums here regarding LVM but didn't find much. Cloning and ghost lead to the fantastic thread on dd that I already had saved.

I would prefer not to have to do a new install and hope that someone may have tried to do something like this. My old drive is still working but I would prefer to go with the newer drive (again an ide), and I was contemplating moving to a sata but saw a few problems out there.

Hope that someone can provide some additional insight.

Peter

Junior Hacker

10-13-2007 02:12 PM

I'm a little pressed for time today, so did not read the link I post here, but this person shows how to reduce an LVM. Perhaps the steps can help you expand one. You can also look here.
I installed Fedora 7 in Windows under Vmware, it set up LVM also, but have not had the need to play with it.

peterb

10-15-2007 10:56 AM

Hi all,

I had a look at those links and found some useful info and so I decided to try a little experimentation.

Copied using dd 20gb to 80gb, then performed the following tests each time reloading the 80gb drive.

#1
system boots normally
fdisk -l shows mbr problem as well as not using full 80gb capacity

#3
system boots normally
using x-window I started LVM
LVM shows uninitialized partitions equaling the difference between the 20gb and the 80gb
initialized the partitions
merged using LVM to group00
rebooted
system boots to grub
attempted manually grub but cannot find filesystem files as outlined in
the grub trouble shooting guide
grub> root
(hd0,0): Filesystem type unknown, partition type 0x8e
it sees the LVM as unknown, the 8e is correct.

Anyway, after trying out the above and a few other ideas, I finally gave up and simply installed a fresh copy on the new 80gb drive.

I guess that this is just one of those things for the wishlist for the future.

Peter
:twocents:

saikee

10-15-2007 11:37 AM

There is something wrong in your approach if you can't find the kernel "vmlinuz" or "bzImage".

I say this because no Linux boot loader can read a LVM and so to boot a Linux with a LVM the kernel must be placed in a /boot partition which is what your /dev/hda1 is all about.

You therefore has no requirement to alter the boundary of hda1 and the kernels inside are untouched and should always accessible.

For a fresh installation you could have done so by installing it in the newly created partitions hda3 (for Linxu) and hda4 (for swap). That way you can go back to fetch all your previous data in the LVM and copy them on to the new partition.

If you opt out the LVM you can install the Linux in a single partition with /boot as a subdirectory to "/".

AwesomeMachine

10-15-2007 02:09 PM

This is ridiculous. Just partition the free space and format it. Don't use LVM, though. LVM is partition voodoo, and I don't know anyone who understands it, anyone who uses it, or any tools that work with it. I think it should be mandatory, in every distro, that the user do a custom partition setup, so they can avoid LVM.