After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786031 - Could not stat device /dev/mapper/No RAID disks - No such file or directory
Could not stat device /dev/mapper/No RAID disks - No such file or directory
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
unspecified
Other Linux
: Normal minor
: ---
Assigned To: Mike Fleetwood
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2017-08-09 07:29 UTC by ek
Modified: 2019-05-29 17:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (469 bytes, patch)
2017-08-09 07:29 UTC, ek
none Details | Review
Stop trying to access device '/dev/mapper/No RAID disks' (v1) (5.12 KB, patch)
2019-03-30 10:15 UTC, Mike Fleetwood
none Details | Review

Description ek 2017-08-09 07:29:20 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.
Comment 1 Curtis Gedak 2017-08-09 16:22:09 UTC
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?
Comment 2 Mike Fleetwood 2019-03-30 10:15:41 UTC
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
Comment 3 Curtis Gedak 2019-03-31 15:46:25 UTC
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
Comment 4 Curtis Gedak 2019-04-01 15:17:41 UTC
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
Comment 5 Curtis Gedak 2019-05-29 17:06:54 UTC
This enhancement was included in the GParted 1.0.0 release on May 29, 2019.