Closed jvinolas closed 2 weeks ago
Hi @jvinolas! You did everything right. The data should be flushed to the backend device. There is no dirty data on the cache. However after stopping the cache, the cache device still contains metadata and clean data, so after loading it, it could already start in a warm state. If you want to start the cache entirely from scratch (because, for example, you have written something to the backend device while the cache was stopped, effectively rendering the cached data outdated), you can either do it adding --force
to the cache start command, instructing it to ignore the old metadata, or by calling casadm --zero-metadata
, to erase the metadata from the cache device before starting a new instance.
So @robertbaldyga , either if the wb cache is unclean (not flushed to core device because server hung for example) or if it was correctly flushed with casctl stop --flush
I understand the --load
to activate again the cache should be safe and it seems the recomended method to do it, right? (taking into account that no access has been done to the core device meanwhile, of course).
Yes, that's correct.
thanks!
Description
Following documentation for start and stop I did what I show in steps to reproduce and activating the cache device again after a
casctl stop --flush
throws error saying there is data in the cache that needs to be replayed.I'm activating/deactivating opencas manually, so nothing set in
/etc/opencas/opencas.conf
. What I'm doing wrong?Expected Behavior
No data should be found in cache after a
casctl stop --flush
command triggered.Actual Behavior
Data found
Steps to Reproduce
Context
Activating/Deactivating cache
Possible Fix
-
Logs
-
Configuration files
-
Your Environment
casadm -S -i 1 -d /dev/disk/by-id/nvme-SAMSUNG_MZWLR3T8HBLS-00AU3_S64VNE0NC03689-part1 --cache-line-size 64 -c wb --force && casadm --set-param --name cleaning-alru -i 1 --wake-up 0 --staleness-time 1 --flush-max-buffers 10000 --activity-threshold 0