-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
No
-
None
-
sst_logical_storage
-
ssg_filesystems_storage_and_HA
-
10
-
12
-
3
-
False
-
-
None
-
None
-
None
-
None
-
None
While trying to add a disk to md raid0 with the new device by using the command "mdadm /dev/md101 --add /dev/sdd" it throws the error "add new device failed" but this command creates the raid signature on the newly added disk.
We can reproduce the issue with the below steps:
~~~
[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 9.2 (Plow)
[root@localhost ~]# uname -r
5.14.0-427.16.1.el9_4.x86_64
[root@localhost ~]# rpm -qa |grep -i mdadm
mdadm-4.2-8.el9.x86_64
[root@localhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 102.4M 0 disk
sdb 8:16 0 102.4M 0 disk
sdc 8:32 0 102.4M 0 disk
sdd 8:48 0 102.4M 0 disk
sde 8:64 0 102.4M 0 disk
sr0 11:0 1 1024M 0 rom
vda 252:0 0 10G 0 disk
├─vda1 252:1 0 1G 0 part /boot
└─vda2 252:2 0 9G 0 part
├─rhel-root 253:0 0 8G 0 lvm /
└─rhel-swap 253:1 0 1G 0 lvm [SWAP]
===> Created the RAID0 with the 3 devices.
[root@localhost ~]# mdadm -create /dev/md101 -level=raid0 --raid-devices=3 /dev/sda /dev/sdb /dev/sdc
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md101 started.
[root@localhost ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4] [raid0]
md101 : active raid0 sdc[2] sdb[1] sda[0]
307200 blocks super 1.2 512k chunks
unused devices: <none>
--> Array created and it's in active state.
[root@localhost ~]# mdadm -D /dev/md101
/dev/md101:
Version : 1.2
Creation Time : Mon Jun 10 19:56:47 2024
Raid Level : raid0
Array Size : 307200 (300.00 MiB 314.57 MB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Update Time : Mon Jun 10 19:56:47 2024
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Layout : unknown
Chunk Size : 512K
Consistency Policy : none
Name : localhost.localdomain:101 (local to host localhost.localdomain)
UUID : 0382685c:fdb8335a:42c94258:77730569
Events : 0
Number Major Minor RaidDevice State
0 8 0 0 active sync /dev/sda
1 8 16 1 active sync /dev/sdb
2 8 32 2 active sync /dev/sdc
--> When I tried to add the device to the md101 it's throwing the below error but leaving the md raid signature on the disk.
[root@localhost ~]# mdadm /dev/md101 --add /dev/sdd
mdadm: add new device failed for /dev/sdd as 3: Invalid argument
[root@localhost ~]# blkid |grep -i raid
/dev/sdd: UUID="0382685c-fdb8-335a-42c9-425877730569" UUID_SUB="f682dc02-62af-d480-b1ed-da15bd603cb8" LABEL="localhost.localdomain:101" TYPE="linux_raid_member"
/dev/sdb: UUID="0382685c-fdb8-335a-42c9-425877730569" UUID_SUB="e7d92098-5cbe-8d3c-b968-c0e119fabf89" LABEL="localhost.localdomain:101" TYPE="linux_raid_member"
/dev/sdc: UUID="0382685c-fdb8-335a-42c9-425877730569" UUID_SUB="29dfdff0-8609-5702-e0fd-f101f22c9b29" LABEL="localhost.localdomain:101" TYPE="linux_raid_member"
/dev/sda: UUID="0382685c-fdb8-335a-42c9-425877730569" UUID_SUB="c71818a0-0e25-1a15-8e89-6a719cbfd38c" LABEL="localhost.localdomain:101" TYPE="linux_raid_member"
EXPECTATION:
If a command is failing then it should not write the raid signature on the disk or with the failed state it should clear the command references.
NOTE: Issue is reproducible on RHEL 8, RHEL9