Score:0

LVM aggressive read and write cache

np flag

I've added a 2 TB RAID1 SSD as a writeback cache to a 10 TB RAID1 HDD using LVM 2.03.11(2) (2021-01-08) like this:

lvcreate --type raid1 --mirrors 1 --nosync -l 100%FREE -n sshd sshd /dev/sdc /dev/sdd
lvcreate --type raid1 --mirrors 1 --nosync -l 100%FREE -n cache sshd /dev/nvme1n1 /dev/ssd_blend/ssd_blend
lvconvert --type cache --cachemode writeback --chunksize 2M --cachevol cache sshd/sshd

and the default behavior is slowly promoting new blocks. I want it to behave more like a writecache, where blocks are from the start written to the cache and later on moved to the slow disk. I want cached what was written last, regardless of the hit count.
I don't want to use writecache though, because I also want read cache.

Is there a way to do that?
I tried

lvchange --cachepolicy smq --cachesettings 'write_promote_adjustment=0' sshd

but doesn't do anything.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.