1

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.

3 Answers 3

3

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

3
  • I won't even confuse LVM if I leave the original disk in the system? Commented Apr 7, 2010 at 20:47
  • No but you'd have to be considerate of your BIOS boot order if things don't perform as expected. Commented Apr 7, 2010 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. Commented Apr 7, 2010 at 20:59
2

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.

0

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!

1
  • 1
    Isn't that the point? Commented Jun 10, 2014 at 21:29

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.