Linux RAID subsystem development
 help / color / mirror / Atom feed
* md regression caused by commit 9e59d609763f70a992a8f3808dabcce60f14eb5c
@ 2025-08-06 15:28 Mikulas Patocka
  2025-08-07  0:04 ` Xiao Ni
  0 siblings, 1 reply; 11+ messages in thread
From: Mikulas Patocka @ 2025-08-06 15:28 UTC (permalink / raw)
  To: Xiao Ni, Yu Kuai, Song Liu; +Cc: linux-raid, vkuznets, yuwatana, luca.boccassi

[-- Attachment #1: Type: text/plain, Size: 3689 bytes --]

Hi

I report that the commit 9e59d609763f70a992a8f3808dabcce60f14eb5c causes 
problem with this mdadm script:

modprobe brd rd_size=1048576
mdadm --create /dev/md/mdmirror --name mdmirror --uuid aaaaaaaa:bbbbbbbb:cccccccc:00000001 /dev/ram0 /dev/ram1 -v -f --level=1 --raid-devices=2
mdadm -v --stop /dev/md/mdmirror
mdadm --assemble /dev/md/mdmirror --name mdmirror -v

Prior to this commit, the last command successfully assembles the array. 
After this commit, it reports an error "mdadm: Unable to initialize 
sysfs".

See https://bugzilla.redhat.com/show_bug.cgi?id=2385871

This is the strace of the failed mdadm --assemble command:

mknodat(AT_FDCWD, "/dev/.tmp.md.2512:9:127", S_IFBLK|0600, makedev(0x9, 0x7f)) = 0
openat(AT_FDCWD, "/dev/.tmp.md.2512:9:127", O_RDWR|O_EXCL|O_DIRECT) = 4
unlink("/dev/.tmp.md.2512:9:127")       = 0
fstat(4, {st_mode=S_IFBLK|0600, st_rdev=makedev(0x9, 0x7f), ...}) = 0
readlink("/sys/dev/block/9:127", "../../devices/virtual/block/md12"..., 199) = 33
openat(AT_FDCWD, "/proc/mdstat", O_RDONLY) = 5
fcntl(5, F_SETFD, FD_CLOEXEC)           = 0
fstat(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(5, "Personalities : [raid1] \nunused "..., 1024) = 48
read(5, "", 1024)                       = 0
close(5)                                = 0
ioctl(4, STOP_ARRAY, 0)                 = 0
openat(AT_FDCWD, "/dev/ram1", O_RDWR|O_EXCL|O_DIRECT) = 5
ioctl(5, BLKSSZGET, [512])              = 0
fstat(5, {st_mode=S_IFBLK|0660, st_rdev=makedev(0x1, 0x1), ...}) = 0
ioctl(5, BLKGETSIZE64, [1073741824])    = 0
lseek(5, 4096, SEEK_SET)                = 4096
read(5, "\374N+\251\1\0\0\0\0\0\0\0\0\0\0\0\252\252\252\252\273\273\273\273\314\314\314\314\0\0\0\1"..., 4096) = 4096
lseek(5, 0, SEEK_CUR)                   = 8192
fstat(5, {st_mode=S_IFBLK|0660, st_rdev=makedev(0x1, 0x1), ...}) = 0
close(5)                                = 0
write(2, "mdadm: /dev/ram1 is identified a"..., 72) = 72
openat(AT_FDCWD, "/dev/ram0", O_RDWR|O_EXCL|O_DIRECT) = 5
ioctl(5, BLKSSZGET, [512])              = 0
fstat(5, {st_mode=S_IFBLK|0660, st_rdev=makedev(0x1, 0), ...}) = 0
ioctl(5, BLKGETSIZE64, [1073741824])    = 0
lseek(5, 4096, SEEK_SET)                = 4096
read(5, "\374N+\251\1\0\0\0\0\0\0\0\0\0\0\0\252\252\252\252\273\273\273\273\314\314\314\314\0\0\0\1"..., 4096) = 4096
lseek(5, 0, SEEK_CUR)                   = 8192
fstat(5, {st_mode=S_IFBLK|0660, st_rdev=makedev(0x1, 0), ...}) = 0
close(5)                                = 0
write(2, "mdadm: /dev/ram0 is identified a"..., 72) = 72
openat(AT_FDCWD, "/dev/ram0", O_RDONLY|O_EXCL|O_DIRECT) = 5
ioctl(5, BLKSSZGET, [512])              = 0
fstat(5, {st_mode=S_IFBLK|0660, st_rdev=makedev(0x1, 0), ...}) = 0
ioctl(5, BLKGETSIZE64, [1073741824])    = 0
lseek(5, 4096, SEEK_SET)                = 4096
read(5, "\374N+\251\1\0\0\0\0\0\0\0\0\0\0\0\252\252\252\252\273\273\273\273\314\314\314\314\0\0\0\1"..., 4096) = 4096
lseek(5, 0, SEEK_CUR)                   = 8192
close(5)                                = 0
fstat(4, {st_mode=S_IFBLK|0600, st_rdev=makedev(0x9, 0x7f), ...}) = 0
readlink("/sys/dev/block/9:127", 0x7ffcd3ed18b0, 199) = -1 ENOENT (Adresář nebo soubor neexistuje) !!! FAILURE !!!
newfstatat(AT_FDCWD, "/sys/block/md127/md", 0x7ffcd3ed1a30, 0) = -1 ENOENT (Adresář nebo soubor neexistuje)
write(2, "mdadm: Unable to initialize sysf"..., 34) = 34
unlink("/run/mdadm/map.lock")           = 0
close(3)                                = 0
close(4)                                = 0
exit_group(1)                           = ?

See the line that is marked "!!! FAILURE !!!". Prior to the commit 
9e59d609763f70a992a8f3808dabcce60f14eb5c, mdadm is able to read the 
/sys/dev/block/9:127 symlink.

Mikulas

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-08-12  8:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-06 15:28 md regression caused by commit 9e59d609763f70a992a8f3808dabcce60f14eb5c Mikulas Patocka
2025-08-07  0:04 ` Xiao Ni
2025-08-07  8:40   ` Luca Boccassi
2025-08-07 14:17     ` Mikulas Patocka
2025-08-08  5:28       ` Xiao Ni
2025-08-08  6:40         ` Yu Kuai
2025-08-08  7:01           ` Xiao Ni
2025-08-08  8:07           ` Luca Boccassi
2025-08-11 18:31             ` Luca Boccassi
2025-08-12  7:40               ` Xiao Ni
2025-08-12  8:50                 ` Luca Boccassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox