mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
cache: use conditional in warning message
In some cases the message could be slightly misleading so use here rather conditional. TODO: In future we may possibly further tune the message in case we are certain the level of redundancy protection has not been reduced.
This commit is contained in:
parent
5b5c5cc618
commit
5e88d3a89b
@ -129,7 +129,7 @@ void cache_check_for_warns(const struct lv_segment *seg)
|
||||
|
||||
if (lv_is_raid(origin_lv) &&
|
||||
first_seg(seg->pool_lv)->cache_mode == CACHE_MODE_WRITEBACK)
|
||||
log_warn("WARNING: Data redundancy is lost with writeback "
|
||||
log_warn("WARNING: Data redundancy could be lost with writeback "
|
||||
"caching of raid logical volume!");
|
||||
|
||||
if (lv_is_thin_pool_data(seg->lv))
|
||||
|
@ -39,7 +39,7 @@ lvcreate --type raid1 -m 1 --nosync -l 2 -n $lv1 $vg
|
||||
lvcreate --type raid1 -m 1 --nosync -l 2 -n ${lv1}_cachepool $vg
|
||||
#should lvs -a $vg/${lv1}_cdata_rimage_0 # ensure images are properly renamed
|
||||
lvconvert --yes --type cache --cachemode writeback --cachepool $vg/${lv1}_cachepool $vg/$lv1 2>&1 | tee out
|
||||
grep "WARNING: Data redundancy is lost" out
|
||||
grep "WARNING: Data redundancy could be lost" out
|
||||
check lv_exists $vg/${lv1}_corig_rimage_0 # ensure images are properly renamed
|
||||
dmsetup table ${vg}-$lv1 | grep cache # ensure it is loaded in kernel
|
||||
lvremove -f $vg
|
||||
@ -47,7 +47,7 @@ lvremove -f $vg
|
||||
|
||||
lvcreate -n corigin -m 1 --type raid1 --nosync -l 10 $vg
|
||||
lvcreate -n cpool --type cache $vg/corigin --cachemode writeback -l 10 2>&1 | tee out
|
||||
grep "WARNING: Data redundancy is lost" out
|
||||
grep "WARNING: Data redundancy could be lost" out
|
||||
not lvconvert --splitmirrors 1 --name split $vg/corigin "$dev1"
|
||||
lvconvert --yes --splitmirrors 1 --name split $vg/corigin "$dev1"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user