gparted identifying incorrect raid arrays

Bug #1074606 reported by martin suc on 2012-11-03
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GParted
Fix Released
Medium
gparted (Ubuntu)
Medium
Phillip Susi
Quantal
High
Phillip Susi

Bug Description

SRU Justification:

Users get a popup reporting internal errors/bugs relating to oddly named raid arrays that do not exist. There was a module that probed for mdadm devices by running mdadm --examine --scan to scan all disks for raid metadata. This is incorrect and sometimes reports incorrect information so this module was removed upstream, and gparted now relies on /proc/partitions to detect active raid arrays. There should be little to no chance of regression.

Test Case: create an mdadm raid array, but do NOT add it to /etc/mdadm.conf. After a reboot, mdadm will activate it as /dev/md127 instead of /dev/md0 because it isn't registered in the conf file. Gparted thinks it should be /dev/md0 and errors because it doesn't exist.

End SRU justification.

On startup, gparted complains with several popups that it has an internal parted bug trying to stat /dev/md/XXXX. This appears to be caused by its reliance on running mdadm --examine --scan to identify raid arrays. Recent versions of mdadm now report the existence of "containers" that are not usable block devices, but gparted thinks they are. It also reports the preferred major number rather than the actual. In other words, if the metadata says it is supposed to be /dev/md0, that is what mdadm reports, however it may have been activated as /dev/md127 instead, causing gparted to try to use a device that does not exist.

Related branches

martin suc (martin-suc) wrote :

Forgot to add: I am using:
mdadm.
no lvm.
disks are gpt.

Curtis Gedak (gedakc) wrote :

To try to troubleshoot the problem, would you be able to provide the output from the following two commands?

     sudo fdisk -l -u

Where one of the options is a lower case "L" and not the number one.

     sudo parted -l

Where one of the options is a lower case "L" and not the number one.

Also, could you try the latest release of GParted Live?
http://gparted.org/livecd.php

The version of GParted included with Ubuntu uses libparted for the DMRAID partition names, whereas the version on GParted Live uses native GParted code.

Phillip Susi (psusi) wrote :

You appear to be running a version of gparted from getdeb rather than Ubuntu.

Changed in gparted (Ubuntu):
status: New → Invalid
martin suc (martin-suc) wrote :
Download full text (19.7 KiB)

sudo fdisk -l -u

Disk /dev/sda: 3000 GB, 3000590369280 bytes
255 heads, 63 sectors/track, 364801 cylinders, total 5860528065 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 2048 5860532223 2930272033 83 Linux
Warning: Partition 1 does not end on cylinder boundary.

Disk /dev/sdb: 2000 GB, 2000396321280 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907024065 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot Start End Blocks Id System
/dev/sdb1 34 2040254 1020096 83 Linux
/dev/sdb2 * 2050048 4096574 1020127 83 Linux
/dev/sdb3 4096575 86012009 40949685 82 Linux Swap / Solaris
/dev/sdb4 86013952 290809855 102398310 83 Linux
Warning: Partition 4 does not end on cylinder boundary.
/dev/sdb6 290809856 905214554 307194930 83 Linux
/dev/sdb5 905216000 3907024895 1500904755 83 Linux
Warning: Partition 5 does not end on cylinder boundary.

Disk /dev/sdc: 2000 GB, 2000396321280 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907024065 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot Start End Blocks Id System
/dev/sdc1 2048 3497591474 1748795706 83 Linux
/dev/sdc2 3497591475 3548790629 25591545 83 Linux
/dev/sdc3 3548790630 3599989784 25591545 83 Linux
/dev/sdc4 3599989785 3651188939 25591545 83 Linux
/dev/sdc5 3651188940 3702388094 25591545 83 Linux
/dev/sdc6 3702388095 3753587249 25591545 83 Linux
/dev/sdc7 3753587250 3907024064 76710375 83 Linux

Disk /dev/sdd: 1000 GB, 1000202273280 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953520065 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot Start End Blocks Id System
/dev/sdd1 * 2048 208140928 104077071 7 HPFS/NTFS
Warning: Partition 1 does not end on cylinder boundary.
/dev/sdd2 212845185 366789214 76967415 7 HPFS/NTFS
Warning: Partition 2 does not end on cylinder boundary.
/dev/sdd3 432325215 645331049 106494885 7 HPFS/NTFS
/dev/sdd4 645335038 1953521663 654094507 f Extended LBA
Warning: Partition 4 does not end on cylinder boundary.
/dev/sdd5 645335040 1071321087 212989770 83 Linux
Warning: Partition 5 does not end on cylinder boundary.
/dev/sdd6 1071323136 1953520064 441096705 7 HPFS/NTFS
Warning: Partition 6 does not end on cylinder boundary.

Disk /dev/sde: 2000 GB, 2000396321280 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907024065 sectors
Units = sectors of 1 * 512 = 512 bytes

   Device Boot Start End Blocks Id System
/dev/sde1 2048 3497639669 1748819803 83 Linux
/dev/sde2 3497639670 3548838824 25591545 83 Linux
/dev/sde3 3548838825 3600037979 25591545 83 Linux
/dev/sde4 3600037980 3651237134 25591545 83 Linux
/dev/sde5 3651237135 3702436289 25591545 83 Linux
/dev/sde6 37024362...

Curtis Gedak (gedakc) wrote :

As far as I know, packages from one distribution are not guaranteed to work on another. Since the package referred to in this report is not from Ubuntu, Phillip has marked this report as invalid.

You might consider compiling GParted from source code so that you have the latest version.

martin suc (martin-suc) wrote :

geddeb packages are from ubuntuupgrade, those packeges are specificaly target for ubuntu distribution - so what do you mean by your explanation ?
I have compiled gparted from source code many times before - it has the same problems but I give it a try again anyway.

Phillip Susi (psusi) wrote :

I mean this bug was filed against the package in Ubuntu, and since you are not running that, this is incorrect. If you have this issue with the upstream gparted, you should report it to their bug tracker at:

https://bugzilla.gnome.org/

martin suc (martin-suc) wrote :

This bug appeared in all gparted versions, no matter from which repository is it taken.

Phillip Susi (psusi) wrote :

Can you make sure you are running the version from Ubuntu? Please run apt-cache policy gparted and post the results. Also could you try describing the problem better, because I can not understand what is wrong. The first partition should end in "p1" such as /dev/md0p1.

martin suc (martin-suc) wrote :

I have already run apt-cache policy for gparted which I am using now.
Sorry, I am not going to reinstall it if I know that it behaves the same way even if use gparted from Ubuntu original repository. This error did not happened just ones but in many versions before counting from gparted version 11.
Basically not /dev/md0p1 - the first partition should be end like /dev/m127 /dev/m127p1 /dev/127p2 , ... . Not start from 0 but start from 127 counting down.

Phillip Susi (psusi) on 2012-11-07
Changed in gparted (Ubuntu):
importance: Undecided → Medium
status: Invalid → Triaged
summary: - gparted raid wrong information
+ gparted identifying incorrect raid arrays
description: updated
Changed in gparted:
importance: Unknown → Medium
status: Unknown → Incomplete
Phillip Susi (psusi) on 2012-11-15
Changed in gparted (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Phillip Susi (psusi)
Phillip Susi (psusi) wrote :

Working well here. I have applied the patch to the Ubuntu package and am preparing to upload it.

Changed in gparted:
status: Incomplete → Confirmed
Changed in gparted:
status: Confirmed → Incomplete
Changed in gparted:
status: Incomplete → Confirmed
Phillip Susi (psusi) on 2012-12-03
Changed in gparted (Ubuntu Quantal):
status: New → In Progress
assignee: nobody → Phillip Susi (psusi)
Phillip Susi (psusi) on 2012-12-03
description: updated
Changed in gparted (Ubuntu Quantal):
importance: Undecided → High
James Page (james-page) wrote :

Phillip

Unsubscribing ubuntu-sponsors from this bug report; once the new version is in Debian and synced to Raring please make the development task 'Fix Released' and propose the linked branch for quantal for Merge.

No need to subscribe ubuntu-sponsors again; the MP will show up in the right place.

Thanks.

Phillip Susi (psusi) wrote :

James, the new upstream version won't be merged into quantal as that would violate SRU policy. Just the patch needs merged.

Brian Murray (brian-murray) wrote :

James mentioned Raring needing a merge not Quantal.

Curtis Gedak (gedakc) wrote :

GParted 0.14.1 was released upstream on December 12, 2012 and includes a fix for this problem.

Phillip Susi (psusi) wrote :

I have bacported just the fix to this problem to the version in quantal, so it needs a merge. The new upstream release containing the fix should be uploaded to and synced from debian any day now.

Changed in gparted:
status: Confirmed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gparted - 0.12.1-2

---------------
gparted (0.12.1-2) unstable; urgency=low

  * debian/patches/drop-swraid.patch: Upstream patch to remove broken and
    uneeded swraid support that was causing errors with mdadm devices
    (LP: #1074606) (Closes: #697872).

 -- Phillip Susi <email address hidden> Thu, 29 Nov 2012 13:55:11 -0500

Changed in gparted (Ubuntu):
status: In Progress → Fix Released
Phillip Susi (psusi) on 2013-01-14
description: updated
Iain Lane (laney) wrote :

Uploaded to Q; thanks!

Phillip Susi (psusi) on 2013-01-31
description: updated
Clint Byrum (clint-fewbar) wrote :

Hi Phillip, thanks for the upload to quantal-proposed. The changelog needs to be targetted at quantal-proposed, its only an accident that it got into the quantal-proposed queue. Everything else is good, so please re-upload with the changelog fixed and it should be accepted ASAP.

Phillip Susi (psusi) wrote :

I thought the build system was changed to force it to -proposed specifically so you *DON'T* have to add it to the changelog?

Colin Watson (cjwatson) wrote :

Phillip is correct and there's no need to reupload. Clint, this is a Launchpad change as of about four months ago.

Changed in gparted (Ubuntu Quantal):
status: In Progress → Fix Committed
tags: added: verification-needed

Hello martin, or anyone else affected,

Accepted gparted into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/gparted/0.12.1-1ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Clint Byrum (clint-fewbar) wrote :

My bad, I had thought that this was just an accident, and we still wanted to use the -proposed upload target so as not to confuse it with release pocket.

Phillip Susi (psusi) wrote :

Can anyone still running quantal and affected by this please verify the fix so we can get it migrated to the release pocket?

Steve Langasek (vorlon) wrote :

This SRU has remained unverified after 259 days in the -proposed queue. I've removed it now from quantal-proposed and am marking the task 'wontfix'.

Changed in gparted (Ubuntu Quantal):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.