mirror of
git://sourceware.org/git/lvm2.git
synced 2025-10-21 15:33:18 +03:00
Compare commits
4 Commits
v2_02_186
...
dev-mcsont
Author | SHA1 | Date | |
---|---|---|---|
|
604b4bef61 | ||
|
9e6313074a | ||
|
ee7bf5634e | ||
|
a85387696e |
@@ -130,8 +130,8 @@ devices {
|
|||||||
# device path names. Each regex is delimited by a vertical bar '|'
|
# device path names. Each regex is delimited by a vertical bar '|'
|
||||||
# (or any character) and is preceded by 'a' to accept the path, or
|
# (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
|
# 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.
|
# path is used, producing the 'a' or 'r' result for that path.
|
||||||
# When multiple path names exist for a block device, if any path name
|
# If any of multiple existing path names for a block device
|
||||||
# matches an 'a' pattern before an 'r' pattern, then the device is
|
# 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
|
# accepted. If all the path names match an 'r' pattern first, then the
|
||||||
# device is rejected. Unmatching path names do not affect the accept
|
# device is rejected. Unmatching path names do not affect the accept
|
||||||
|
@@ -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"
|
"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"
|
"(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"
|
"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"
|
"path is used, producing the 'a' or 'r' result for that path.\n"
|
||||||
"When multiple path names exist for a block device, if any path name\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"
|
"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"
|
"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"
|
"device is rejected. Unmatching path names do not affect the accept\n"
|
||||||
|
@@ -1945,6 +1945,10 @@ int add_mirror_log(struct cmd_context *cmd, struct logical_volume *lv,
|
|||||||
return 1;
|
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)))
|
if (!(parallel_areas = build_parallel_areas_from_lv(lv, 0, 0)))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
|
@@ -148,7 +148,7 @@ endif
|
|||||||
# Handle installation of files
|
# Handle installation of files
|
||||||
ifeq ("@WRITE_INSTALL@", "yes")
|
ifeq ("@WRITE_INSTALL@", "yes")
|
||||||
# leaving defaults
|
# leaving defaults
|
||||||
M_INSTALL_SCRIPT =
|
M_INSTALL_PROGRAM =
|
||||||
M_INSTALL_DATA = -m 644
|
M_INSTALL_DATA = -m 644
|
||||||
else
|
else
|
||||||
M_INSTALL_PROGRAM = -m 555
|
M_INSTALL_PROGRAM = -m 555
|
||||||
|
@@ -293,15 +293,20 @@ lvcreate -aey -l15 -n $lv1 $vg
|
|||||||
not lvconvert --type mirror -m1 --corelog --stripes 2 $vg/$lv1
|
not lvconvert --type mirror -m1 --corelog --stripes 2 $vg/$lv1
|
||||||
lvremove -ff $vg
|
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
|
# Linear to mirror with mirrored log using --alloc anywhere
|
||||||
lvcreate -aey -l2 -n $lv1 $vg "$dev1"
|
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"
|
lvconvert --type mirror -m +1 --mirrorlog mirrored --alloc anywhere $vg/$lv1 "$dev1" "$dev2"
|
||||||
should check mirror $vg $lv1
|
should check mirror $vg $lv1
|
||||||
|
fi
|
||||||
lvremove -ff $vg
|
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
|
# Should not be able to add images to --nosync mirror
|
||||||
# but should be able to after 'lvchange --resync'
|
# but should be able to after 'lvchange --resync'
|
||||||
lvcreate -aey --type mirror -m 1 -l1 -n $lv1 $vg --nosync
|
lvcreate -aey --type mirror -m 1 -l1 -n $lv1 $vg --nosync
|
||||||
|
@@ -37,7 +37,14 @@ lvcreate -n$lv3 -l4 --permission r -s $vg/$lv1
|
|||||||
cleanup_lvs
|
cleanup_lvs
|
||||||
|
|
||||||
# Skip the rest for cluster
|
# 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
|
# 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"
|
not lvcreate --type mirror -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere "$dev1"
|
||||||
cleanup_lvs
|
cleanup_lvs
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
vgremove -ff $vg
|
vgremove -ff $vg
|
||||||
|
@@ -1216,6 +1216,11 @@ static int _lvconvert_mirrors(struct cmd_context *cmd,
|
|||||||
(old_log_count == new_log_count))
|
(old_log_count == new_log_count))
|
||||||
return 1;
|
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,
|
if (!_lvconvert_mirrors_aux(cmd, lv, lp, NULL,
|
||||||
new_mimage_count, new_log_count, lp->pvh))
|
new_mimage_count, new_log_count, lp->pvh))
|
||||||
return_0;
|
return_0;
|
||||||
|
Reference in New Issue
Block a user