1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00

Complain when lvconvert --repair is used on non-mirror LV.

This commit is contained in:
Petr Rockai 2009-06-10 15:27:57 +00:00
parent 578a9a3332
commit 6a1c94d48d

View File

@ -894,6 +894,11 @@ static int lvconvert_single(struct cmd_context *cmd, struct logical_volume *lv,
return ECMD_FAILED;
}
if (arg_count(cmd, repair_ARG) && !(lv->status & MIRRORED)) {
log_error("Can't repair non-mirrored LV \"%s\".", lv->name);
return ECMD_FAILED;
}
if (lp->snapshot) {
if (lv->status & MIRRORED) {
log_error("Unable to convert mirrored LV \"%s\" into a snapshot.", lv->name);