casadm: print error message when activate failed

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk 2022-04-21 13:56:23 +02:00
parent 70834a74cd
commit 94f46c1d3c

View File

@ -3021,6 +3021,7 @@ int standby_activate(int cache_id, const char *cache_device)
}
if (cas_ioctl(KCAS_IOCTL_STANDBY_ACTIVATE, &cmd) != SUCCESS) {
cas_printf(LOG_ERR, "Error activating cache %d\n", cache_id);
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");