Moving LVM Snaphot and Snapshot Related Volume

The pvmove lvm2 command cannot move snapshot volumes, or the volumes those snapshots were created from.

However, I would like to move the volumes off the disk they are on anyway.  Note that the snapshot volume is a Copy on Write volume.

So, for the main volume, I could just create a new one on a different disk, and dd the volume over.  Then delete the original - however this would trash the snapshot volume.

My question is about the snapshot - this is a CoW so only contains deltas from the original volume as I understand it.  They are inextricably linked.  So my question is - is there any way I can move these volumes to a new physical disk keeping the original and snapshot intact.

Note that I only want to move the volumes - I don't need a solution that involved duplicating the entire disk.
LVL 9
muffAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

cjl7freelance for hireCommented:
Can't be done!

But you can mount the thing read-only and rsync it to a new logical volume.

That's about it...

//jonas
0
muffAuthor Commented:

Yeah, rsyncing is obvious, but only half the solution.   There is an original volume, then a snapshot cow volume with various differences to the original.  Copying the original volume is straightforward, so my own answer to this question would be copy the  original, create a snapshot that will be the equivilent of the current snapshot, then do a second rsync to copy any files on the current snapshot over to the new snapshot that are different.

That should hopefully recreate the snapshot volume, while maintaining the benefit of it being a snapshot cow - It will still exist as a smaller volume because it only contain the deltas.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.