]> sourceware.org Git - lvm2.git/blame - doc/pvmove_outline.txt
man: document allocation process in lvm.8
[lvm2.git] / doc / pvmove_outline.txt
CommitLineData
39742324
JT
1Let's say we have an LV, made up of three segments of different PV's,
2I've also added in the device major:minor as this will be useful
3later:
4
5+-----------------------------+
6| PV1 | PV2 | PV3 | 254:3
7+----------+---------+--------+
8
9
10Now our hero decides to PV move PV2 to PV4:
11
121. Suspend our LV (254:3), this starts queueing all io, and flushes
13 all pending io. Once the suspend has completed we are free to change
14 the mapping table.
15
162. Set up *another* (254:4) device with the mapping table of our LV.
17
183. Load a new mapping table into (254:3) that has identity targets for
19 parts that aren't moving, and a mirror target for parts that are.
20
214. Unsuspend (254:3)
22
23So now we have:
24 destination of copy
25 +--------------------->--------------+
26 | |
27+-----------------------------+ + -----------+
28| Identity | mirror | Ident. | 254:3 | PV4 |
29+----------+---------+--------+ +------------+
30 | | |
31 \/ \/ \/
32+-----------------------------+
aa5c5673 33| PV1 | PV2 | PV3 | 254:4
39742324
JT
34+----------+---------+--------+
35
36Any writes to segment2 of the LV get intercepted by the mirror target
37who checks that that chunk has been copied to the new destination, if
38it hasn't it queues the initial copy and defers the current io until
39it has finished. Then the current io is written to *both* PV2 and the
40PV4.
41
425. When the copying has completed 254:3 is suspended/pending flushed.
43
446. 254:4 is taken down
45
467. metadata is updated on disk
47
488. 254:3 has new mapping table loaded:
49
50+-----------------------------+
51| PV1 | PV4 | PV3 | 254:3
52+----------+---------+--------+
This page took 0.064441 seconds and 5 git commands to generate.