mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-24 17:57:48 +03:00
report: also display "mirror" keyword in lv_type for pvmove LV and display "multiple" for external origin used for more than one thin snapshot
$ lvs -a -o name,vg_name,attr,layout,type LV VG Attr Layout Type lvol0 vg -wI-a----- linear linear [pvmove0] vg p-C-aom--- mirror mirror,pvmove (added "mirror" for pvmove LV) $ lvs -a -o name,vg_name,attr,layout,type LV VG Attr Layout Type lvol0 vg ori------- linear external,multiple,origin,thin [lvol1_pmspare] vg ewi------- linear metadata,pool,spare lvol2 vg Vwi-a-tz-- thin snapshot,thin lvol3 vg Vwi-a-tz-- thin snapshot,thin pool vg twi-a-tz-- pool,thin pool,thin [pool_tdata] vg Twi-ao---- linear data,pool,thin [pool_tmeta] vg ewi-ao---- linear metadata,pool,thin (added "multiple" for external origin used for more than one thin snapshot - lvol0 in the example above)
This commit is contained in:
parent
90c47a4968
commit
b806836164
@ -172,7 +172,8 @@ static int _lv_type_list_mirror(struct dm_pool *mem,
|
||||
goto_bad;
|
||||
top_level = 0;
|
||||
} else if (lv->status & PVMOVE) {
|
||||
if (!str_list_add_no_dup_check(mem, type, _lv_type_names[LV_TYPE_PVMOVE]))
|
||||
if (!str_list_add_no_dup_check(mem, type, _lv_type_names[LV_TYPE_PVMOVE]) ||
|
||||
!str_list_add_no_dup_check(mem, type, _lv_type_names[LV_TYPE_MIRROR]))
|
||||
goto_bad;
|
||||
}
|
||||
|
||||
@ -384,6 +385,9 @@ int lv_layout_and_type(struct dm_pool *mem, const struct logical_volume *lv,
|
||||
if (!str_list_add_no_dup_check(mem, *type, _lv_type_names[LV_TYPE_ORIGIN]) ||
|
||||
!str_list_add_no_dup_check(mem, *type, _lv_type_names[LV_TYPE_EXTERNAL]))
|
||||
goto_bad;
|
||||
if (lv->external_count > 1 &&
|
||||
!str_list_add_no_dup_check(mem, *type, _lv_type_names[LV_TYPE_MULTIPLE]))
|
||||
goto_bad;
|
||||
if (!lv_is_thin_volume(lv) &&
|
||||
!str_list_add_no_dup_check(mem, *type, _lv_type_names[LV_TYPE_THIN]))
|
||||
goto_bad;
|
||||
|
Loading…
x
Reference in New Issue
Block a user