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.