Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to clone a smaller LVM-formatted disk onto a larger one using dd, and boot that disk in the same machine. Do I need to make any special considerations for LVM?

Thanks! Although I considered the cool on-the-fly migration, where a second drive is added to an LVM volume and then LVM is told to remove the original drive from the volume, I decided my system would be much more likely to boot (and fully backed up, on the original disk) if I simply cloned the disk with dd, moved the new drive over to the first channel, removed the old drive, booted, added another partition in the new free space, added that partition to the original, smaller LVM volume, and used resize2fs to make the new space available to the filesystem. This worked great.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

If a block for block copy, no. You'd later extend the volumes using the unused space.

share|improve this answer
    
I won't even confuse LVM if I leave the original disk in the system? –  joeforker Apr 7 '10 at 20:47
    
No but you'd have to be considerate of your BIOS boot order if things don't perform as expected. –  Warner Apr 7 '10 at 20:51
    
Additionally, trying to boot the secondary disk 'sdb' using the installation configured for the primary 'sda' would not boot after copy. For the initial dd, it should be fine. Otherwise, the boot disk would have to be on the same channel as before to operate as expected without changes. –  Warner Apr 7 '10 at 20:59

Having the same volume group name will confuse LVM. Make sure you change the original's name with vgrename if you keep the original disks in the system.

share|improve this answer

Cloning a disk completely confuses lvm. I made an exact copy (with dd) of a LVM partition onto another disk, and lvm started using the copy instead of the original!

share|improve this answer
1  
Isn't that the point? –  Michael Hampton Jun 10 at 21:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.