GNOME Bugzilla – Bug 556114
no longer sees /dev/mapper/* devices
Last modified: 2009-03-05 17:38:19 UTC
Please describe the problem: This bug was originally reported by an Ubuntu user here: https://bugs.launchpad.net/ubuntu/intrepid/+source/gparted/+bug/271796 Following the change in gparted 0.3.8 to avoid using libparted's device discovery, support for /dev/mapper/* block devices that were supported by libparted has regressed, as these devices do not appear in /proc/partitions. Steps to reproduce: $ dd if=/dev/zero of=looptest1 bs=1048576 count=10 $ dd if=/dev/zero of=looptest2 bs=1048576 count=10 $ losetup -f looptest1 $ losetup -f looptest2 $ (echo 0 20480 linear /dev/loop0 0; echo 20480 20480 linear /dev/loop1 0) | dmsetup create test Now run gparted. (To tear down this test setup, reverse the steps: 'dmsetup remove test', look at 'losetup -a' to find the loop device names, 'losetup -d DEVICE' on both of them, and remove looptest1 and looptest2.) Actual results: gparted doesn't see /dev/mapper/test. Expected results: gparted should offer /dev/mapper/test in its disk drop-down. Does this happen every time? Yes. Other information: Attached please find a patch to implement this, based loosely on libparted's algorithm. It doesn't yet include an Ubuntu patch to parted that filters out dmraid partition devices, but all the same it's still an improvement over what gparted does now.
Created attachment 120495 [details] [review] find /dev/mapper devices when not using libparted for device discovery
Thank you Colin for the patch and the list of steps to reproduce the problem. This was especially useful to me as my knowledge of /dev/mapper devices is limited. Before committing this patch I plan to investigate the Ubuntu patch you mentioned regarding filtering out dmraid partition devices.
Again, thank you for the patch Colin. The patch has been committed to the GNOME SVN repository for inclusion in the next release of gparted (0.4.0). Closing this bug.
Hi Colin, This patch was included in the GParted 0.4.0 release, and I received immediate feedback about many LVM partitions now showing up in the device list. Obviously I did not perform my due diligence on this problem and I apologize for this. To try to address the situation, I plan to roll back this change until a better solution is found. With this in mind, I would like to explore this problem further. Which /dev/mapper/* devices do you think should be included GParted's device list? My own thoughts are that GParted should support Fake RAID (dmraid) devices, but not any other /dev/mapper/* devices because they are not partitionable in the traditional sense. /dev/mapper Device Supports Partitions? ------------------ -------------------------------------- Crypt (dm-crypt) I don't think so. Fake RAID (dmraid) Yes LVM No (but does support logical volumes) SW RAID (mdadm) No I look forward to your comments. Regards, Curtis Gedak
Thank you again Colin for your interest in GParted, and your proposed patch. Since I believe that this bug refers to GParted not supporting DMRAID /dev/mapper devices, I am marking it as a duplicate of an earlier reported bug. If you are able to help with testing preliminary dmraid support in GParted, please refer to: http://bugzilla.gnome.org/show_bug.cgi?id=317262#c36 It would beneficial to track all dmraid /dev/mapper device support comments in bug #317262. *** This bug has been marked as a duplicate of 317262 ***