Discussion:
[linux-lvm] export/migrate - but only a LV - how?
lejeczek
2016-07-12 15:23:51 UTC
Permalink
.. if possible?

hi users,

I'd like to ask, while reading different docs, whether it's
possible to migrate/export just a LV?

What I'm hoping to achieve is to take a LV out of a VG and
move it over to another system so a can restore that LV and
carry on using it, while having a reduced VG on original,
source system.

I see there some docs tell how to do a VG, how only a LV can
be migrated?

many thanks
Brassow Jonathan
2016-07-18 15:50:58 UTC
Permalink
maybe pvmove the LV to a unique device and then vgsplit?

brassow
Post by lejeczek
.. if possible?
hi users,
I'd like to ask, while reading different docs, whether it's possible to migrate/export just a LV?
What I'm hoping to achieve is to take a LV out of a VG and move it over to another system so a can restore that LV and carry on using it, while having a reduced VG on original, source system.
I see there some docs tell how to do a VG, how only a LV can be migrated?
many thanks
_______________________________________________
linux-lvm mailing list
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Xen
2016-07-18 20:28:58 UTC
Permalink
Post by Brassow Jonathan
maybe pvmove the LV to a unique device and then vgsplit?
brassow
Post by lejeczek
.. if possible?
Shouldn't you in general just recreate the LV with the same amount of
extents and then perform a DD?

I realize an atomic move operation for an LV could conceptually be nice
but apart from the mental effort required to do this recreation
manually, there is not much practically in the way of doing it yourself.

In the end, it would be nothing more than a shell script doing an
LVCREATE, DD, and LVREMOVE?

Regards.
Brassow Jonathan
2016-07-22 13:12:42 UTC
Permalink
Post by Brassow Jonathan
maybe pvmove the LV to a unique device and then vgsplit?
brassow
Post by lejeczek
.. if possible?
Shouldn't you in general just recreate the LV with the same amount of extents and then perform a DD?
I realize an atomic move operation for an LV could conceptually be nice but apart from the mental effort required to do this recreation manually, there is not much practically in the way of doing it yourself.
In the end, it would be nothing more than a shell script doing an LVCREATE, DD, and LVREMOVE?
One advantage is that pvmove allows you to keep the device online... We are also working on a feature ATM called “duplicate”. It allows you to create a duplicate of any LV stack, create the duplicate where you want, and even change the segment type in the process. For example, you could move a whole RAID5 LV, or thin-p, in one go.

brassow
Xen
2016-07-22 13:49:49 UTC
Permalink
Post by Brassow Jonathan
One advantage is that pvmove allows you to keep the device online...
Right, that is pretty advanced. Good going.
Post by Brassow Jonathan
We are also working on a feature ATM called “duplicate”. It allows
you to create a duplicate of any LV stack, create the duplicate where
you want, and even change the segment type in the process. For
example, you could move a whole RAID5 LV, or thin-p, in one go.
I think one important "trouble spot" is that there is no operation
yet(?) to create a duplicate of a PV that will not ruin the system
unless you do pvchange -u and vgchange -u ;-).

It took quite a bit of time for me to realize what was going on ;-).

Is PVMOVE supposed to be a backup task? I don't think so? How are you
supposed to back something up if you are planning to move your system to
a new disk?

Continue reading on narkive:
Loading...