diff --git a/lib/activate/activate.c b/lib/activate/activate.c index 9a852463d..fd2d250fc 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -277,9 +277,13 @@ int _load(struct logical_volume *lv, int task) } } - if (!(lv->status & LVM_WRITE) && !dm_task_set_ro(dmt)) - log_error("Failed to set %s read-only during activation.", - lv->name); + if (!((lv->status & LVM_WRITE) && (lv->vg->status & LVM_WRITE))) { + if (!dm_task_set_ro(dmt)) + log_error("Failed to set %s read-only during " + "activation.", lv->name); + else + log_very_verbose("Activating %s read-only", lv->name); + } if (!(r = dm_task_run(dmt))) diff --git a/tools/lvchange.c b/tools/lvchange.c index eac4b9c23..abb1470c1 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -47,10 +47,10 @@ static int lvchange_single(struct logical_volume *lv) int doit = 0; int archived = 0; - if ((lv->vg->status & PARTIAL_VG) && + if (!(lv->vg->status & LVM_WRITE) && (arg_count(contiguous_ARG) || arg_count(permission_ARG) || arg_count(readahead_ARG))) { - log_error("Only -a permitted with partial volume group \"%s\"", + log_error("Only -a permitted with read-only volume group \"%s\"", lv->vg->name); return EINVALID_CMD_LINE; }