GNOME Bugzilla – Bug 786031
Could not stat device /dev/mapper/No RAID disks - No such file or directory
Last modified: 2019-05-29 17:06:54 UTC
Created attachment 357230 [details] [review] patch OS: AltLinux (kernel 4.4) # gparted ... Could not stat device /dev/mapper/No RAID disks - No such file or directory # dmraid --version dmraid version: 1.0.0.rc14 (2006.11.08) debug dmraid library version: 1.0.0.rc14 (2006.11.08) device-mapper version: 4.34.0 # dmraid -sa -c No RAID disks but gparted is waiting for string 'no raid disks' (as into dmraid 1.0.0.rc16). Patch in the attachment.
Thanks ek for discovering this issue and posting a patch to make the code comparison more robust. In GParted patches we try to include a link between the commit message and the bug report. This can help later when troubleshooting. For examples see the git log or also the following link: Developing GParted using Git http://gparted.org/git.php Would you be able to make the changes to the git commit message?
Created attachment 374216 [details] [review] Stop trying to access device '/dev/mapper/No RAID disks' (v1) Hi Curtis, Here's a patch to fix this. The patch from ek in comment #0 does work but it requires remembering that Utils::regexp_label() does case insensitive matching to understand that it works. So instead I used if (output.substr(0, 13).lowercase() != "no raid disks") as the condition to make the code more obvious. I built dmraid 1.0.0.rc14 from source (but didn't install it) to confirm the exit status and output as documented in the commit message. I then used a script /usr/local/bin/dmaraid with content: #!/bin/sh echo "No RAID disks" exit 0 to test GParted. Also tested varying the case and exit status to make sure it all still worked, as well as testing with just dmraid 1.0.0.rc16 proper installed without my hacked script. There's also an unrelated tidyup patch. Thanks, Mike
Hi Mike, These code changes look good to me. I tested with my Intel Software RAID on Kubuntu 16.04 and no regressions were observed. If no concerns are raised then I will commit these changes to the git master branch in the next day or so. Thanks, Curtis
This patch set has been committed to the git master branch for inclusion in the next release of GParted. The relevant git commits can be viewed at the following links: Stop trying to access device '/dev/mapper/No RAID disks' (#786031) https://gitlab.gnome.org/GNOME/gparted/commit/fc5cc1d3b460110d0709eb9bba00369ab779ec45 Rename local variable to meaningful benchmark_copysize https://gitlab.gnome.org/GNOME/gparted/commit/a476b8cc2c37271b4110af6cd83b442bb655c172
This enhancement was included in the GParted 1.0.0 release on May 29, 2019.