diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2016-03-01 15:20:49 +0100 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2016-03-03 13:46:18 +0100 |
commit | 3a0ef77305b179511aae6d8e5af05bbbebabee6b (patch) | |
tree | 77548f8cf077f428d2246ca05d4e179cdeac2050 /lib/thin | |
parent | 790b2e874822767808f3c5bcc4ce1499944969ff (diff) | |
download | lvm2-3a0ef77305b179511aae6d8e5af05bbbebabee6b.tar.gz |
metadata: format_text: also export historical LVs
Also export historical LVs when exporting LVM2 metadata.
This is list of all historical LVs listed in
"historical_logical_volumes" metadata section with all
the properties exported for each historical LV.
For example, we have this thin snapshot sequence:
lvol1 --> lvol2 --> lvol3
\
--> lvol4
We end up with these metadata:
logical_volume {
...
(lvol1, lvol3 and lvol4 listed here as usual - no change here)
...
}
historical_logical_volumes {
lvol2 {
id = "S0Dw1U-v5sF-LwAb-W9SI-pNOF-Madd-5dxSv5"
creation_time = 1456919613 # 2016-03-02 12:53:33 +0100
removal_time = 1456919620 # 2016-03-02 12:53:40 +0100
origin = "lvol1"
descendants = ["lvol3", "lvol4"]
}
}
By removing lvol1 further, we end up with:
historical_logical_volumes {
lvol2 {
id = "S0Dw1U-v5sF-LwAb-W9SI-pNOF-Madd-5dxSv5"
creation_time = 1456919613 # 2016-03-02 12:53:33 +0100
removal_time = 1456919620 # 2016-03-02 12:53:40 +0100
origin = "-lvol1"
descendants = ["lvol3", "lvol4"]
}
lvol1 {
id = "me0mes-aYnK-nRfT-vNlV-UiR1-GP7r-ojbROr"
creation_time = 1456919608 # 2016-03-02 12:53:28 +0100
removal_time = 1456919767 # 2016-03-02 12:56:07 +0100
}
}
Diffstat (limited to 'lib/thin')
-rw-r--r-- | lib/thin/thin.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/thin/thin.c b/lib/thin/thin.c index 221ac48ce..6a1905592 100644 --- a/lib/thin/thin.c +++ b/lib/thin/thin.c @@ -532,6 +532,7 @@ static int _thin_text_export(const struct lv_segment *seg, struct formatter *f) outf(f, "external_origin = \"%s\"", seg->external_lv->name); if (seg->origin) outf(f, "origin = \"%s\"", seg->origin->name); + if (seg->merge_lv) outf(f, "merge = \"%s\"", seg->merge_lv->name); |