diff --git a/casadm/cas_lib.c b/casadm/cas_lib.c index c0b53f1..9066d71 100644 --- a/casadm/cas_lib.c +++ b/casadm/cas_lib.c @@ -3033,9 +3033,17 @@ int standby_activate(int cache_id, const char *cache_device) } if (cas_ioctl(KCAS_IOCTL_STANDBY_ACTIVATE, &cmd) != SUCCESS) { - print_err(cmd.ext_err_code ? : KCAS_ERR_SYSTEM); + if (abs(cmd.ext_err_code) == OCF_ERR_NOT_OPEN_EXC) { + cas_printf(LOG_ERR, "Cannot open the device exclusively. Make sure " + "to detach cache before activation.\n"); + } else { + print_err(cmd.ext_err_code ? : KCAS_ERR_SYSTEM); + } return FAILURE; } + cas_printf(LOG_INFO, "Successfully activated cache instance %hu\n", + cache_id); + return SUCCESS; }