[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LVM RAID resync



On 27/10/25 at 15:29, Nicolas George wrote:
Hi.


Prologue: I did not manage to find a users mailing-list for LVM. If
somebody knows the address, that would be useful.


With mdadm RAID, there is an automatic check of the RAID array every
month. On some hardware, it can make the system unresponsive, but it can
be controlled with the sysctl dev.raid.speed_limit_max. It makes it easy
to set dev.raid.speed_limit_max to a very low value when the system
needs to be responsive or when another process uses the same disk and to
a larger value when the system is idle.

With LVM RAID, it does not happen. LVM RAID uses MD for its
implementation, as evidenced by the fact that triggering a resync causes
“md: check of RAID array mdX” to appear in the kernel messages, but the
same limits do not apply.

More precisely, dev.raid.speed_limit_max do not control the speed of
resync of LVM RAID. Instead, we can set the value on a per-volume basis
using “lvchange --maxrecoveryrate”.

Unfortunately, this command has the slight drawback of interrupting the
check, and it will re-start at zero.

Am I missing something? Is there a way to control LVM RAID checks that
is as convenient as the resync of mdadm RAID?

Regards,


The resync process is usually scheduled when the system administrator knows that the system is idle, no other activities is done. My hints is to avoid playing with "/sys/block/md0/md/sync_speed_max" or "/proc/sys/dev/raid/speed_limit_max" and plan the resync process to happens when you know that there isn't activities. (If you can: I never used LVM RAID).

Kind regards.
--
Franco Martelli


Reply to: