On 13/10/25 at 23:27, Andy Smith wrote:
Hi,
On Mon, Oct 13, 2025 at 09:38:47PM +0200, Franco Martelli wrote:
I'm unable to set "group_thread_cnt". I've added it to "mdadm.conf"
following the syntax in the its man-page:
…
SYSFS name=/dev/md/0 sync_speed_max=1000000
SYSFS name=/dev/md/0 group_thread_cnt=8
and then I rebuild the initramfs image file, but after reboot only
"sync_speed_max" is set:
~# cat /sys/block/md0/md/sync_speed_max
1000000 (system)
~# cat /sys/block/md0/md/group_thread_cnt
0
I've never tried doing that before.
Does /sys/block/md0/md/group_thread_cnt change if you set it manually,
e.g. with
# echo 8 > /sys/block/md0/md/group_thread_cnt
?
Yes, I can set it manually:
~$ echo 8 | sudo tee /sys/block/md0/md/group_thread_cnt
8
~$ cat /sys/block/md0/md/group_thread_cnt
8
If so then maybe it is worth a post on the linux-raid mailing list to
ask if this is a bug in mdadm or some misunderstanding. I did wonder if
the name= was wrong (perhaps should be /dev/md0 instead) but you did say
that sync_speed_max is getting set so seems not.
With "/dev/md0" in "mdadm.conf":
…
SYSFS name=/dev/md0 group_thread_cnt=8
SYSFS name=/dev/md0 sync_speed_max=1000000
I got:
~# update-initramfs -u
update-initramfs: Generating /boot/initrd.img-6.12.48+deb13-amd64
mdadm: /dev/md0 is an invalid name for an md device - ignored.
mdadm: Device name not found in sysfs config entry - ignoring.
mdadm: /dev/md0 is an invalid name for an md device - ignored.
mdadm: Device name not found in sysfs config entry - ignoring.
but "/dev/md0" is a regular block device:
~$ ls -l /dev/md0
brw-rw---- 1 root disk 9, 0 14 ott 14.53 /dev/md0
while "/dev/md/0" is a sym-link to "md0":
~# ls -l /dev/md/0
lrwxrwxrwx 1 root root 6 14 ott 14.53 /dev/md/0 -> ../md0
I've also tried to use the "uuid=" option but it didn't work the same.
In the meantime until that bit is settled, if it can be changed after
boot you can still run a script after boot to do it, right? Until more
elegant solution is found. It's not like the name "md0" should be
changing, as that is set by metadata on the devices themselves.
Yes I can set it after the boot, but I would prefer that this settings
(group_thread_cnt) be made earlier in the boot process, is it possible
to do that with Systemd? Have Systemd a surrogate of the old "rc.local"
file?
Sadly using "/dev/md0" seems wrong for "mdadm".
Thanks in advance, kind regards.
--
Franco Martelli