summaryrefslogtreecommitdiffstats
path: root/doc/pvmove_outline.txt
diff options
context:
space:
mode:
authorJoe Thornber <thornber@redhat.com>2002-01-24 09:26:13 +0000
committerJoe Thornber <thornber@redhat.com>2002-01-24 09:26:13 +0000
commit397423242ed701ea82b49f9de50132a125f983c6 (patch)
treee3fe6094661b2383fe187fde6af7193b62d16c3f /doc/pvmove_outline.txt
parent610c25e8b123430377a9dd55c33ee09018135ea2 (diff)
downloadlvm2-397423242ed701ea82b49f9de50132a125f983c6.tar.gz
lvm2-397423242ed701ea82b49f9de50132a125f983c6.tar.xz
lvm2-397423242ed701ea82b49f9de50132a125f983c6.zip
o Cut and paste description of how pvmove works that I was mailing someone.
Diffstat (limited to 'doc/pvmove_outline.txt')
-rw-r--r--doc/pvmove_outline.txt52
1 files changed, 52 insertions, 0 deletions
diff --git a/doc/pvmove_outline.txt b/doc/pvmove_outline.txt
new file mode 100644
index 00000000..dbffb8de
--- /dev/null
+++ b/doc/pvmove_outline.txt
@@ -0,0 +1,52 @@
+Let's say we have an LV, made up of three segments of different PV's,
+I've also added in the device major:minor as this will be useful
+later:
+
++-----------------------------+
+| PV1 | PV2 | PV3 | 254:3
++----------+---------+--------+
+
+
+Now our hero decides to PV move PV2 to PV4:
+
+1. Suspend our LV (254:3), this starts queueing all io, and flushes
+ all pending io. Once the suspend has completed we are free to change
+ the mapping table.
+
+2. Set up *another* (254:4) device with the mapping table of our LV.
+
+3. Load a new mapping table into (254:3) that has identity targets for
+ parts that aren't moving, and a mirror target for parts that are.
+
+4. Unsuspend (254:3)
+
+So now we have:
+ destination of copy
+ +--------------------->--------------+
+ | |
++-----------------------------+ + -----------+
+| Identity | mirror | Ident. | 254:3 | PV4 |
++----------+---------+--------+ +------------+
+ | | |
+ \/ \/ \/
++-----------------------------+
+| PV1 | PV2 | PV3 | 254:3
++----------+---------+--------+
+
+Any writes to segment2 of the LV get intercepted by the mirror target
+who checks that that chunk has been copied to the new destination, if
+it hasn't it queues the initial copy and defers the current io until
+it has finished. Then the current io is written to *both* PV2 and the
+PV4.
+
+5. When the copying has completed 254:3 is suspended/pending flushed.
+
+6. 254:4 is taken down
+
+7. metadata is updated on disk
+
+8. 254:3 has new mapping table loaded:
+
++-----------------------------+
+| PV1 | PV4 | PV3 | 254:3
++----------+---------+--------+