1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-09-17 21:44:24 +03:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Marian Csontos
604b4bef61 mirror: Add deprecation warning for mirrored log 2018-02-14 12:53:51 +01:00
Marian Csontos
9e6313074a test: mirrored mirrorlog is not supposed to work in cluster 2018-02-14 12:33:56 +01:00
Marian Csontos
ee7bf5634e make: Fix typo
- M_INSTALL_SCRIPT is unused, should be M_INSTALL_PROGRAM
2018-02-13 17:26:39 +01:00
Marian Csontos
a85387696e config: Clarify filter documentation 2018-02-13 17:26:39 +01:00
7 changed files with 32 additions and 9 deletions

View File

@@ -130,8 +130,8 @@ devices {
# device path names. Each regex is delimited by a vertical bar '|'
# (or any character) and is preceded by 'a' to accept the path, or
# by 'r' to reject the path. The first regex in the list to match the
# path is used, producing the 'a' or 'r' result for the device.
# When multiple path names exist for a block device, if any path name
# path is used, producing the 'a' or 'r' result for that path.
# If any of multiple existing path names for a block device
# matches an 'a' pattern before an 'r' pattern, then the device is
# accepted. If all the path names match an 'r' pattern first, then the
# device is rejected. Unmatching path names do not affect the accept

View File

@@ -290,8 +290,8 @@ cfg_array(devices_filter_CFG, "filter", devices_CFG_SECTION, CFG_DEFAULT_COMMENT
"device path names. Each regex is delimited by a vertical bar '|'\n"
"(or any character) and is preceded by 'a' to accept the path, or\n"
"by 'r' to reject the path. The first regex in the list to match the\n"
"path is used, producing the 'a' or 'r' result for the device.\n"
"When multiple path names exist for a block device, if any path name\n"
"path is used, producing the 'a' or 'r' result for that path.\n"
"If any of multiple existing path names for a block device\n"
"matches an 'a' pattern before an 'r' pattern, then the device is\n"
"accepted. If all the path names match an 'r' pattern first, then the\n"
"device is rejected. Unmatching path names do not affect the accept\n"

View File

@@ -1945,6 +1945,10 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
return 1;
}
if (log_count > 1) {
log_warn("Log type \"mirrored\" is DEPRECATED and will be removed in the future. Use RAID1 LV or disk log instead.");
}
if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0, 0)))
return_0;

View File

@@ -148,7 +148,7 @@ endif
# Handle installation of files
ifeq ("@WRITE_INSTALL@", "yes")
# leaving defaults
M_INSTALL_SCRIPT =
M_INSTALL_PROGRAM =
M_INSTALL_DATA = -m 644
else
M_INSTALL_PROGRAM = -m 555

View File

@@ -293,15 +293,20 @@ lvcreate -aey -l15 -n $lv1 $vg
not lvconvert --type mirror -m1 --corelog --stripes 2 $vg/$lv1
lvremove -ff $vg
test -e LOCAL_CLVMD && exit 0
# FIXME - cases which needs to be fixed to work in cluster
# Linear to mirror with mirrored log using --alloc anywhere
lvcreate -aey -l2 -n $lv1 $vg "$dev1"
if test -e LOCAL_CLVMD; then
# This is not supposed to work in cluster
not lvconvert --type mirror -m +1 --mirrorlog mirrored --alloc anywhere $vg/$lv1 "$dev1" "$dev2"
else
lvconvert --type mirror -m +1 --mirrorlog mirrored --alloc anywhere $vg/$lv1 "$dev1" "$dev2"
should check mirror $vg $lv1
fi
lvremove -ff $vg
# FIXME - cases which needs to be fixed to work in cluster
test -e LOCAL_CLVMD && exit 0
# Should not be able to add images to --nosync mirror
# but should be able to after 'lvchange --resync'
lvcreate -aey --type mirror -m 1 -l1 -n $lv1 $vg --nosync

View File

@@ -37,7 +37,14 @@ lvcreate -n$lv3 -l4 --permission r -s $vg/$lv1
cleanup_lvs
# Skip the rest for cluster
test -e LOCAL_CLVMD && exit 0
if test -e LOCAL_CLVMD; then
# ---
# Create mirror on two devices with mirrored log using --alloc anywhere - should always fail in cluster
not lvcreate --type mirror -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere "$dev1" "$dev2"
cleanup_lvs
else
# ---
# Create mirror on two devices with mirrored log using --alloc anywhere
@@ -49,4 +56,6 @@ cleanup_lvs
not lvcreate --type mirror -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere "$dev1"
cleanup_lvs
fi
vgremove -ff $vg

View File

@@ -1216,6 +1216,11 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
(old_log_count == new_log_count))
return 1;
if ((old_log_count != new_log_count) &&
(new_log_count == MIRROR_LOG_MIRRORED)) {
log_warn("Log type \"mirrored\" is DEPRECATED and will be removed in the future. Use RAID1 LV or disk log instead.");
}
if (!_lvconvert_mirrors_aux(cmd, lv, lp, NULL,
new_mimage_count, new_log_count, lp->pvh))
return_0;