20 lines
471 B
Diff
20 lines
471 B
Diff
tools/lvconvert.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
|
|
index cd9a3e8..aa2dca7 100644
|
|
--- a/tools/lvconvert.c
|
|
+++ b/tools/lvconvert.c
|
|
@@ -5351,6 +5351,11 @@ static int _writecache_zero(struct cmd_context *cmd, struct logical_volume *lv)
|
|
};
|
|
int ret;
|
|
|
|
+ if (!(lv->status & LVM_WRITE)) {
|
|
+ log_error("Cannot initialize readonly LV %s", display_lvname(lv));
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
if (test_mode())
|
|
return 1;
|
|
|