Score:0

What does the Cpy%Sync column of lvs output mean for a cache LV?

it flag

I have a host with a single cache LV (~800GB SSD in front of a multi-TB RAID array; write-through mode). I ran a routine scrub on the RAID last night (lvchange --syncaction check). Ever since that completed, the system has been running at 100% I/O capacity; iostat tells me it's reading data from the SSD and writing to the RAID.

The Cpy%Sync column of lvs output for the cache LV (not the RAID) started out at 98% or so before the scrub, which was worrisome in itself, but now it is steadily going down, having currently reached about 70%.

I thought Cpy%Sync for a cache LV indicated the amount of data on the cache that also existed on the backing store, so in write-through mode it should always be 100%. What does it actually mean and what is the system doing that's making it go down steadily?

There is nothing helpful in dmesg.

Score:0
cn flag

According to the lvmraid man pages [1]:

Automatic synchronization happens when a RAID LV is activated, but it is usually partial because the bitmaps reduce the areas that are checked. A full sync becomes necessary when devices in the RAID LV are replaced.

The synchronization status of a RAID LV is reported by the following command, where "Cpy%Sync" = "100%" means sync is complete:

lvs -a -o name,sync_percent

Another excerpt:

When integrity is added to an LV, the kernel needs to initialize the integrity metadata (checksums) for all blocks in the LV. The data corruption checking performed by dm-integrity will only operate on areas of the LV that are already initialized. The progress of integrity initialization is reported by the "syncpercent" LV reporting field (and under the Cpy%Sync lvs column.)

However, another source claiming a similar problem [2] mentions the following in regards to the disk activity:

Cache is always flushing it's content to disk - so if you have the 'writeback' variant and there were some unwritten data which sits only in cache, they are automatically pushed to origin (cached) device - which is likely your disk activity.

  1. https://man7.org/linux/man-pages/man7/lvmraid.7.html
  2. https://listman.redhat.com/archives/linux-lvm/2015-June/msg00001.html
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.