[linux-lvm] How to migrate data from one Hard Drive to a new one

Wolfgang Weisselberg uzx87lvfmukwc001 at sneakemail.com
Tue Sep 2 07:29:01 UTC 2003


Luca Da Col wrote 199 lines:

> 1) pvcreate /dev/hda5
> 2) vgextend Volume00 /dev/hda5

Ok, the Volume Group now has /dev/hda5 added.

> 3) lvextend  --size +97.4g /dev/Volume00/LogVol02 /dev/hda5

> but my /home is still 28G

Well, of course!
You have increased the partition (/dev/Volume00/LogVol02).
You have *not* increased the filesystem /home.

Instead of lvextend you should have used e2fsadm which runs both
lvextend and resize2fs (or ext2resize), and fsck, in the correct
order.  It's a good idea, generally, to umount /home first.

Please read the manpages of e2fsadm, resize2fs and ext2resize
for more information.

-Wolfgang




More information about the linux-lvm mailing list