Merge pull request #1186 from mmichal10/failed-activate-message

casadm: print error message when activate failed
This commit is contained in:
Robert Baldyga 2022-05-03 21:00:37 +02:00 committed by GitHub
commit 6274edb5f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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");