* main - writecache: don't pvmove device used by writecache
@ 2021-06-02 16:14 David Teigland
0 siblings, 0 replies; only message in thread
From: David Teigland @ 2021-06-02 16:14 UTC (permalink / raw)
To: lvm-devel
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e7f107c24666c8577f30e530b74f1ce0347e459b
Commit: e7f107c24666c8577f30e530b74f1ce0347e459b
Parent: 247f69f9aafe731ef85268da1e6ce817295b265d
Author: David Teigland <teigland@redhat.com>
AuthorDate: Wed Jun 2 11:12:20 2021 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Wed Jun 2 11:12:20 2021 -0500
writecache: don't pvmove device used by writecache
The existing check didn't cover the unusual case where the
cachevol exists on the same device as the origin LV.
---
tools/pvmove.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/pvmove.c b/tools/pvmove.c
index da635a662..bb372f7dc 100644
--- a/tools/pvmove.c
+++ b/tools/pvmove.c
@@ -387,6 +387,15 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
return NULL;
}
+ if (lv_is_writecache(lv)) {
+ struct logical_volume *lv_cachevol = first_seg(lv)->writecache;
+ if (lv_is_on_pvs(lv_cachevol, source_pvl)) {
+ log_error("Unable to move device used for writecache cachevol %s.", display_lvname(lv_cachevol));
+ return NULL;
+ }
+
+ }
+
if (lv_is_raid(lv) && lv_raid_has_integrity(lv)) {
log_error("Unable to pvmove device used for raid with integrity.");
return NULL;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-02 16:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-02 16:14 main - writecache: don't pvmove device used by writecache David Teigland
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.