[linux-lvm] lvconvert --uncache takes hours

Demi Marie Obenour demi at invisiblethingslab.com
Wed Mar 1 22:55:31 UTC 2023

On Wed, Mar 01, 2023 at 11:44:00PM +0100, Roy Sigurd Karlsbakk wrote:
> Hi all
> Working with a friend's machine, it has lvmcache turned on with writeback. This has worked well, but now it's uncaching and it takes *hours*. The amount of cache was chosen to 100GB on an SSD not used for much else and the dataset that is being cached, is a RAID-6 set of 10x2TB with XFS on top. The system mainly works with file serving, but also has some VMs that benefit from the caching quite a bit. But then - I wonder - how can it spend hours emptying the cache like this? Most write caching I know of last only seconds or perhaps in really worst case scenarios, minutes. Since this is taking hours, it looks to me something should have been flushed ages ago.
> Have I (or we) done something very stupid here or is this really how it's supposed to work?

It’s likely normal.  HDDs stink at small random writes and RAID-6 makes
this even worse.  That said, I *strongly* recommend using three-disk
RAID-1 for the cache, to match the redundancy of the RAID-6.  With
write-back caching, a failed cache will result in a corrupt and
unrecoverable filesystem.
Demi Marie Obenour (she/her/hers)
Invisible Things Lab
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20230301/10615eeb/attachment.sig>

More information about the linux-lvm mailing list