Moving RHEL 6 to new HDD, EFI and LVM2 questions
Hello everyone,
one year ago I installed RHEL6 on one HDD. This was my first RHEL installation, so I did not spent so much time on partitioning and so on. The partition table looks like this:
sda1: /boot/efi; 200MB
sda2: /boot; 200MB
tmpfs: /dev/shm: 50GB
LVM2:
/dev/mapper/lv_root: 50GB
/dev/mapper/lv_home 50GB
Now I want to change the HDD.
I have done that some times using "dd" or "cp -ax" and fitting the partitions and so on.
- But how to deal with /boot/efi? can I just dd or cp it?
- And what about the LVM? dd the partitions themselfs or the whole LVM?
With best,
Mario
Responses
If you can have the old and new drives available simultaneously the LVM part is quite easy.
See section 13.5.2 in the LVM HOWTO.
http://tldp.org/HOWTO/LVM-HOWTO/removeadisk.html
In brief, pvcreate the new disk, vgextend the VG onto the new VG, and then pvmove the data to the new pv, then vgreduce the old pv from the VG. At that point you can remove the old drive (assuming you've taken care of any other partitions/data on it)