LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-22-2016, 05:35 AM   #1
thebob
LQ Newbie
 
Registered: Jan 2010
Location: France
Posts: 12

Rep: Reputation: 0
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
 
Old 12-22-2016, 09:12 AM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,779

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
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.
 
1 members found this post helpful.
Old 12-28-2016, 04:51 AM   #3
thebob
LQ Newbie
 
Registered: Jan 2010
Location: France
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Clonezilla: failed to create a partition table gerald_anand Linux - Virtualization and Cloud 2 02-06-2015 04:48 PM
[SOLVED] clonezilla lvm and encrption help needed mtdew3q Linux - Newbie 1 09-21-2014 08:54 PM
Fix boot failure after restore partition to a different partition with Clonezilla heronlin LinuxQuestions.org Member Success Stories 2 06-13-2012 09:18 PM
Clonezilla skipping patitions in LVM partition starmonche Linux - General 1 05-24-2011 06:19 PM
repair failed lvm partition aclhkaclhk Linux - Hardware 1 09-08-2009 10:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration