Commit Graph

47 Commits

Author SHA1 Message Date
Michal Mielewczyk
a33896573e Fix standby detach
As the check added in commit a90839f286 tries to open the caching devcie
exclusively, it is impossible to detach cache from a standby instance.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-07-04 10:27:26 +02:00
Michal Mielewczyk
a90839f286 Check for preexisting FS before standby init
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-06-29 12:46:56 +02:00
Michal Mielewczyk
04c2d97ea2 casadm: set log level when printing cmd's usage
Allow printing command's usage with the same log level as it's context

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-03-02 09:44:48 +01:00
Michal Mielewczyk
08307ce77b casadm: prevent using init and load at once
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2022-02-22 09:27:45 +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
199993d9a4 Fix error logging levels
Signed-off-by: Jan Musial <jan.musial@intel.com>
2022-02-10 12:06:37 +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
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
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
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
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
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
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
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
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
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
Adam Rutkowski
4c98949cac Add force option to zero-metadata
Force option is used to enforce metadata erasure despite
dirty data, metadata mistmatch and/or dirty shutdown.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-01-21 15:50:17 -06:00
Robert Baldyga
63eb23ba40
Merge pull request #648 from rafalste/update_copyright
Update copyright statements (2021)
2021-01-21 13:27:51 +01:00
Adam Rutkowski
1fb5fd9662 Verify whether input device path is actually a block device
This applies to add/momove core, start/stop cache, zero superblock
commands.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2021-01-21 14:03:36 -06:00
Rafal Stefanowski
43f43068ad Update copyright statements (2021)
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2021-01-21 13:15:38 +01:00
Slawomir Jankowski
0f331cb650 casadm: Add option to print full /dev/by-id link
User can check path in runtime to use the same in config.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-12-22 16:29:06 +01:00
Michal Rakowski
1cd1db2b45 Fully remove format nvme command
Since there is no kernel-kernel api available to communicate
with nvme driver it is more convenient to use some nvme-dedicated
software (e.g. nvme-cli) to manage nvme devices.
It is even not possible to format nvme device with CAS using current
implementation on newest kernels.

Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-08-11 06:10:31 -04:00
Slawomir Jankowski
1b7c425fae Disable the possibility to use the 'load'
and 'force' flags at once

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-06-01 13:21:53 +02:00
Slawomir Jankowski
9750883d99 Introduce zero-metadata command
Add 'zero-metadata' option to *casadm*.
Handle new option.
Add struct for new option.

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
2020-05-25 10:54:04 +02:00
Robert Baldyga
1e25420f86
Merge pull request #404 from rafalste/copyright_update
Update copyright statements
2020-05-19 11:25:11 +02:00
Michal Mielewczyk
3b62e40a2e Purge core command
Purge invalidates all cache lines which belongs to given core. It is very
usefull feature for tests.

Calling purge is possbile with casadm `--script` swtich.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-05-12 11:32:01 -04:00
Michal Mielewczyk
d24288a9b1 Purge cache command
Purge invalidates all cache lines. It is very usefull feature for tests.

Calling purge is possbile with casadm `--script` swtich.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2020-05-12 11:32:01 -04:00
Rafal Stefanowski
44b4020cc1 Update copyright statements
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
2020-05-04 16:47:38 +02:00
Michal Rakowski
31bc2d2787 casadm: fix get/set seq cutoff param
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-11-22 09:45:50 +01:00
Michal Rakowski
db8ff10cd5 casadm: add err log in case of failed param getting/setting
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-11-20 07:52:05 +01:00
Michal Mielewczyk
296db39ea0 Adapt to new OCF PP param set/get API.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-10-01 06:54:32 -04:00
Michal Mielewczyk
50efb1e165 Enable setting acp params.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-24 11:41:18 -04:00
Robert Bałdyga
8f45549cc7
Merge pull request #107 from robertbaldyga/cleanup-cas-version
Cleanup cas version
2019-09-19 13:45:17 +02:00
Robert Baldyga
19bc5da2cf Cleanup CAS_VERSION
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-09-19 12:43:34 +02:00
Jan Musial
fd24803b74 Handle promotion policy selection in casadm
Signed-off-by: Jan Musial <jan.musial@intel.com>
2019-09-19 08:38:35 +02:00
Michal Mielewczyk
1abb1e7c72 Adapt ioclasses stats command to ocf stats builder.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-09-16 09:24:14 -04:00
Michal Mielewczyk
341222e3d7 Treat '16384' as valid cache id.
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
2019-08-20 03:42:05 -04:00
Michal Rakowski
31fb19e2f1 Report proper casadm version
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-06-27 12:39:26 +02:00
Adam Rutkowski
ffa1f4b067 Extend CAS interface with Write-only cache mode
Write-only (WO) cache mode is similar to Write-back (WB), however
read operations do not promote data to cache. Reads are mostly
serviced by the core device, only dirty sectors are fetched from
the cache.

Write-only cache mode is behaving similarly to Write-back with
respect to flushing dirty data. For example it is required to
explicitly enable/disable flushing when changing cache mode
from WO to something other than WB.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
2019-06-13 15:54:51 -04:00
Michal Rakowski
637ca6e2f4 More descriptive err msg for NVMe format
Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
2019-05-10 13:31:10 +02:00
Robert Baldyga
94e8ca09e0 Initial commit
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2019-03-29 08:45:50 +01:00