1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/metadata
Peter Rajnoha 3a0ef77305 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
  }
}
2016-03-03 13:46:18 +01:00
..
cache_manip.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lv_alloc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lv_manip.c metadata: add add_glv_to_indirect_glvs and remove_glv_from_indirect_glvs 2016-03-03 11:26:51 +01:00
lv.c cleanup: use lv_is_partial 2016-03-03 10:17:03 +01:00
lv.h metadata: add infrastructure to track LV history 2016-03-03 11:26:51 +01:00
merge.c doc: change fsf address 2016-01-21 12:11:37 +01:00
metadata-exported.h metadata: format_text: also export historical LVs 2016-03-03 13:46:18 +01:00
metadata.c metadata: create historical LVs when LVs are removed and interconnect with live LVs 2016-03-03 11:26:51 +01:00
metadata.h metadata: add add_glv_to_indirect_glvs and remove_glv_from_indirect_glvs 2016-03-03 11:26:51 +01:00
mirror.c cleanup: use lv_is_partial 2016-03-03 10:17:03 +01:00
pool_manip.c metadata: create historical LVs when LVs are removed and interconnect with live LVs 2016-03-03 11:26:51 +01:00
pv_alloc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_manip.c cleanup: indent 2016-02-25 23:30:25 +01:00
pv_map.c doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_map.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pv.c report: Shift (u)sed pv_attr under (a)llocatable. 2016-02-26 15:46:37 +00:00
pv.h pv: add is_used_pv fn 2016-02-15 12:44:46 +01:00
raid_manip.c cleanup: use lv_is_partial 2016-03-03 10:17:03 +01:00
replicator_manip.c doc: change fsf address 2016-01-21 12:11:37 +01:00
segtype.c doc: change fsf address 2016-01-21 12:11:37 +01:00
segtype.h doc: change fsf address 2016-01-21 12:11:37 +01:00
snapshot_manip.c doc: change fsf address 2016-01-21 12:11:37 +01:00
thin_manip.c gcc: cleanup some sign warnings 2016-02-23 12:25:25 +01:00
vg.c metadata: add infrastructure to track LV history 2016-03-03 11:26:51 +01:00
vg.h metadata: add infrastructure to track LV history 2016-03-03 11:26:51 +01:00