Commit Graph

147 Commits

Author SHA1 Message Date
Krzysztof Majzerowicz-Jaszcz
72b67aefdd Fix for casadm output when listing detached cache
Fix for issue #1020 - make casadm produce a meaningful output when
listing a detached cache

Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2022-02-25 16:39:25 +01:00
Jan Musial
58b09c11a6 Forbid using load with other options in casadm
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-10 12:06:37 +01:00
Jan Musial
2ff055d689 Don't generate cache_id's on casadm side and use loaded cache params
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-10 12:06:37 +01:00
Jan Musial
199993d9a4 Fix error logging levels
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-10 12:06:37 +01:00
Piotr Debski
038631af2a fix for issue 1021
cache device path for standby mode in Try `casadm --help | -H' for more information.

Signed-off-by: Piotr Debski <piotr.debski@intel.com>
2022-01-30 02:52:32 +01:00
Piotr Debski
1d1baed247 fix for issue #1024 - mismatch metadata error msg
Signed-off-by: Piotr Debski <piotr.debski@intel.com>
2022-01-25 04:20:09 +01:00
Robert Baldyga
63bab9584c Redesign failover standby management
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-01-05 16:17:52 +01:00
Adam Rutkowski
0f6a024025 Make device parameter obligatory in failover activate
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-12-01 00:58:09 +01:00
Adam Rutkowski
8f53682954 extended error messages in casadm --failover-activate
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-12-01 00:58:09 +01:00
Adam Rutkowski
c1935b5c25 Add missing error messages in casadm
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-12-01 00:58:09 +01:00
Michal Mielewczyk
3d8d5c2e99 casadm: fix memory leak
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-11-26 12:32:49 +01:00
Krzysztof Majzerowicz-Jaszcz
4768d06b97 Fix for issue #981
Added extra argument checks for --failover-standby switch in casadm.

Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2021-11-15 12:32:45 +01:00
Robert Baldyga
5431f83273
Merge pull request #962 from Open-CAS/passive_api
Passive state - API changes
2021-11-03 10:11:08 +01:00
Krzysztof Majzerowicz-Jaszcz
3185564869 Standby state API changes
Don't print statistics for a cache in passive state
Passive cache - casadm set/get cache param disabled in passive state
Obsolete "cache_get_param" function removed
Error in layer_cache_management.c fixed
Flushing cache/core disabled with error for passive mode
Core addition disabled in passive mode
IO class setting disabled for passive mode
Counters reset disabled for passive mode
Ioctl handling changes to reflect OCF API changes

Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
2021-10-29 12:34:33 +02:00
Rafal Stefanowski
acec05060d Fix license
Change license to BSD-3-Clause

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-10-28 12:46:42 +02:00
ajrutkow
5a5bf31e04 whitelist drbd device
Signed-off-by: ajrutkow <adam.j.rutkowski@intel.com>
2021-10-08 15:20:52 +02:00
Adam Rutkowski
90d8584bd7 failover detach
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-10-08 15:20:52 +02:00
Robert Baldyga
f8e39fa104 Introduce activate operation
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-10 08:56:59 +02:00
Robert Baldyga
17aa424319 Introduce cache bind operation
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-09-10 08:56:54 +02:00
Michal Mielewczyk
ba8d49d6be casadm: fix typo in an error message
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-08-20 10:24:27 +02:00
Michal Mielewczyk
07ba79c57c Remove remains of upgrade-in-flight support
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-08-16 16:02:09 +02:00
Michal Mielewczyk
c68de77799 Remove remains of atomic writes support
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-08-16 16:01:21 +02:00
Robert Baldyga
c968285d9f Remove upgrade-in-flight feature
Due to changes in Linux kernel this feature is not working anymore.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-08-11 20:33:16 +02:00
Robert Baldyga
a98473afac Better detect if the same device is being added twice
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-28 15:49:46 +02:00
Robert Baldyga
3b0236aca9 Fix error message when removing unplugged cache
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-07-28 15:22:35 +02:00
Adam Rutkowski
7aa883dbd3 OCF update (removed configurable eviction policy)
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-06-21 22:56:51 +02:00
Michal Mielewczyk
850c097e90 casadm: Error message for UUID_EXISTS error code
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-04-14 20:15:14 +02:00
Robert Baldyga
eaebdffa5b
Merge pull request #795 from robertbaldyga/fix-seq-cutoff-thresh-units
casadm: Fix seq cutoff threshold units
2021-04-12 15:06:34 +02:00
Robert Baldyga
61d704fbb9 casadm: Fix seq cutoff threshold units
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-04-12 14:22:58 +02:00
Michal Mielewczyk
4e680bb50a Reorganize remove-inacitve command
Don't remove inactive core if it has dirt cache lines assigned unless `force`
flag is specified.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-04-12 13:48:28 +02:00
Michal Mielewczyk
083d6fe93e Clean-up 'remove-core' command
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-04-09 19:57:07 +02:00
Slawomir Jankowski
6ea3dcbd65 Allow to add special deviced as cores to the cache
Add below devices to whitelist:
* CAS device partitions - fix,
* RAM devices - new,
* null block devices - new.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-04-08 21:59:33 +02:00
Adam Rutkowski
048f25379b Check dirty status in case of metadata mismatch
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-04-06 15:37:44 -05:00
Michał Mielewczyk
7a3b248c35
Merge pull request #764 from mmkayPL/false_stats
Change method for calculating 'dirty_for' statistic
2021-03-31 12:23:53 +02:00
Robert Baldyga
f77e5a9b49
Merge pull request #768 from mmkayPL/fix-core-size-calculation
Change core size gb calculation to use 64bit parameter
2021-03-30 09:47:29 +02:00
Robert Baldyga
8306de7b99 casadm: Fix printing long device paths
Don't break line when first word in column is too long to fit into the
screen.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-03-29 18:35:25 +02:00
Kozlowski Mateusz
32b3c98527 Change core size gb calculation to use 64bit parameter
Fixes #766

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
2021-03-29 13:27:47 +02:00
Slawomir Jankowski
584ef99143 Change time parameter type in printing
Type of `dirty_for` in structs needs to be unified.
Values stored in these fields (both in cache and core info structs)
are  unsigned 64-bits ints but `dirty_for`s were unsigned 32-bits ints
(vide changes in OCF).

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-03-26 13:46:09 +01:00
Robert Baldyga
880cfadde9 Makefile: improve uninstall error handling
Introduce helper functions to handle uninstall errors gracefully.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-03-19 15:37:55 +01:00
Robert Baldyga
feaafdfe06 Makefile: Little cleanup
Move files to components they belong to.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-03-19 15:27:03 +01:00
Michal Mielewczyk
5e035f4b52 casadm: improve error logging
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-03-12 14:12:02 +01:00
Michal Mielewczyk
12db6b4443 Remove redundant cache being stopped check
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-03-12 09:20:19 +01:00
Michal Mielewczyk
66f30dcf12 casadm: use constans for parsing seq cutoff params
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-03-12 09:12:45 +01:00
Slawomir Jankowski
2514f5fa5b Add "remove inactive" command to casadm
Add `remove_inactive_core` function to casadm's code
to handle `remove inactive` command.
Print messages based on errors returned when command fails.
Add documentation comment to new function.
Add CLI part of introduced command.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-03-10 14:39:07 +01:00
Slawomir Jankowski
760b60628c Add KCAS_ERR_CORE_IN_ACTIVE_STATE error code.
New error code will allow to properly handle issues caused by wrong
usage of `remove inactive core` command.
It will also allow to print meaningful error messages.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-03-10 14:39:07 +01:00
Slawomir Jankowski
2bf6e42dea Print separate messages for different "remove core" return codes
Change extended error message for `KCAS_ERR_REMOVED_DIRTY`.
Print informative messages when `remove core` command fails.
Make separate error messages for detaching.
Update help printouts.
Update documentation comments.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-03-10 14:26:09 +01:00
Michal Mielewczyk
35602acb8f Prohibit locking cache while its is being stopped
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-03-09 10:46:47 +01:00
Robert Baldyga
836726409a casadm: Add promotion count parameter
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2021-03-08 07:20:20 +01:00
Slawomir Jankowski
e35b8dd12f Fix for building OpenCAS
On some systems, e.g. Ubuntu, the order of linking `math` library is
important and when linking is done too early, openCAS making fails.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2021-02-09 10:54:11 +01:00
Michal Mielewczyk
ffaaaa0a34 casadm: don't cast a float to an int explicitly
If an underflowed float number was casted to an int explicitly, it's value was
rounded to a lower value.

Using `round()` function ensures that the number will be always rounded to a
nearest integer.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2021-01-29 09:25:16 -05:00