LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Clonezilla fails on LVM partition (https://www.linuxquestions.org/questions/linux-software-2/clonezilla-fails-on-lvm-partition-4175595913/)

thebob 12-22-2016 05:35 AM

Clonezilla fails on LVM partition
 
Hi,

I'm trying to clone a CentOS 6.6 system from an HDD to SSD. This system uses LVM with a LV that I reduced to 107GB in order to fit on the 120GB SSD.

When I try to clone the HDD to SSD with Clonezilla, it clones correctly the /boot partition but doesn't clone the LVM partition and ends up with this screen: http://imgur.com/a/Dd6lR.

I tried a lot of combination such as clone the entire disk, clone only partition and restore partition by partition but I always receive the problem with the UUID message for the LVM partition.

I cannot figure out why Clonezilla cannot copy the LVM partition to another disk. Do you have any recommendations or help in order to find out the problem?

Thank you

rknichols 12-22-2016 09:12 AM

Just what is UUID "hzDx91-TKDY-UpEV-BjvE-qNtO-ROqR-Xt1ZBj"? The output from blkid should show it, or is there actually one PV missing from the volume group, as the message says?

That message, "Physical extents end beyond end of device /dev/sda2" says that whatever you were trying to put there doesn't fit. You said you resized the LV. If you were trying to copy an entire PV, you need to resize the PV as well. Otherwise, the PV will be claiming to have available extents that don't fit on the destination device.

thebob 12-28-2016 04:51 AM

Thank you rknichols, you gave me a clue that helped me a lot. Indeed, something I didn't know is that I needed to resize the PV as well. Unfortunately in my case, I couldn't resize it because some data was allocated at the end of the LVM.

I finally figured it out by using these commands:

Show data allocated on the LVM:
Code:

pvs -v --segments /dev/sda5
Code:

/dev/sda5 ubuntu lvm2 a-- 698.04g 150g 0 xxx root 0 linear /dev/sda:0-xxx
/dev/sda5 ubuntu lvm2 a-- 698.04g 150g xxx yyyy 0 free                         
/dev/sda5 ubuntu lvm2 a-- 698.04g 150g yyyy end swap 0 linear /dev/sda5:yyyy-end

Then move the swap allocated space:
Code:

sudo pvmove --alloc anywhere /dev/sda5:yyyy-end
Finally, the free allocated space should be at the end of the LVM:
Code:

pvs -v --segments /dev/sda5
Code:

/dev/sda5 ubuntu lvm2 a-- 698.04g 150g 0 xxx root 0 linear /dev/sda:0-xxx
/dev/sda5 ubuntu lvm2 a-- 698.04g 150g xxx yyyy swap 0 linear /dev/sda5:xxx-yyyy
/dev/sda5 ubuntu lvm2 a-- 698.04g 150g yyyy end 0 free

It was then possible to reduce the PV. (Other thread that helped me: http://askubuntu.com/a/604302)

After reducing the PV, I was able to clone the HDD to the SSD. The process was completed without any errors this time.

Again, thank you a lot.


All times are GMT -5. The time now is 12:02 PM.