gparted/po
Mike Fleetwood 5f02bcf463 Detect Linux SWRaid members by querying mdadm (#756829)
Detection of Linux SWRaid members currently fails in a number of cases:

1)  Arrays which use metadata type 0.90 or 1.0 store the super block at
    the end of the partition.  So file system signatures in at least
    linear and mirrored arrays occur at the same offsets in the
    underlying partitions.  As libparted only recognises file systems
    this is what is detected, rather than an SWRaid member.

    # mdadm -E -s -v
    ARRAY /dev/md/1  level=raid1 metadata=1.0 num-devices=2 UUID=15224a42:c25bbcd9:15db6000:4e5fe53a name=chimney:1
       devices=/dev/sda1,/dev/sdb1
    ...
    # wipefs /dev/sda1
    offset               type
    ----------------------------------------------------------------
    0x438                ext4   [filesystem]
                         LABEL: chimney-boot
                         UUID:  10ab5f7d-7d8a-4171-8b6a-5e973b402501

    0x1fffe000           linux_raid_member   [raid]
                         LABEL: chimney:1
                         UUID:  15224a42-c25b-bcd9-15db-60004e5fe53a

    # parted /dev/sda print
    Model: ATA VBOX HARDDISK (scsi)
    Disk /dev/sda: 34.4GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number  Start   End     Size    Type      File system  Flags
     1      1049kB  538MB   537MB   primary   ext4         boot, raid
    ...

2)  Again with metadata type 0.90 or 1.0 arrays blkid may report the
    contained file system instead of an SWRaid member.  Have a single
    example of this configuration with a mirrored array containing the
    /boot file system.  Blkid reports one member as ext4 and the other as
    SWRaid!

    # blkid | egrep 'sd[ab]1'
    /dev/sda1: UUID="10ab5f7d-7d8a-4171-8b6a-5e973b402501" TYPE="ext4" LABEL="chimney-boot"
    /dev/sdb1: UUID="15224a42-c25b-bcd9-15db-60004e5fe53a" UUID_SUB="0a095e45-9360-1b17-0ad1-1fe369e22b98" LABEL="chimney:1" TYPE="linux_raid_member"

    Bypassing the blkid cache gets the correct result.

    # blkid -c /dev/null /dev/sda1
    /dev/sda1: UUID="15224a42-c25b-bcd9-15db-60004e5fe53a" UUID_SUB="d0460f90-d11a-e80a-ee1c-3d104dae7e5d" LABEL="chimney:1" TYPE="linux_raid_member"

    However this can't be used because if a user has a floppy configured
    in the BIOS but no floppy attached, GParted will wait for minutes as
    the kernel tries to access non-existent hardware on behalf of the
    blkid query.  See commit:
        18f863151c
        Fix long scan problem when BIOS floppy setting incorrect

3)  Old versions of blkid don't recognise SWRaid members at all so always
    report the file system when found.  Occurs with blkid v1.0 on
    RedHat / CentOS 5.

The only way I can see how to fix all these cases is to use the mdadm
command to query the configured arrays.  Then use this information for
first choice when detecting partition content, making the order: SWRaid
members, libparted, blkid and internal.

GParted shell wrapper already creates temporary blank udev rules to
prevent Linux Software RAID arrays being automatically started when
GParted refreshes its device information[1].  However an administrator
could manually stop or start arrays or change their configuration
between refreshes so GParted must load this information every refresh.
On my desktop with 4 internal hard drives and 3 testing Linux Software
RAID arrays, running mdadm adds between 0.20 and 0.30 seconds to the
device refresh time.

[1] a255abf343
    Prevent GParted starting stopped Linux Software RAID arrays (#709640)

Bug 756829 - SWRaid member detection enhancements
2015-11-02 10:03:45 -07:00
..
.cvsignore added FIXME cleanups (mostly messagebox related) added some more 2006-02-17 21:18:07 +00:00
ar.po Updated Arabic translation 2014-07-14 19:15:23 +01:00
bg.po Updated Bulgarian translation 2012-07-10 21:14:36 +03:00
br.po Updated breton translation, added br in LINGUAS file 2009-08-03 12:47:43 +02:00
bs.po Added Bosnian translation 2015-03-13 23:44:37 +00:00
ca.po Fixes to Catalan translation 2015-04-18 20:07:17 +02:00
ca@valencia.po [l10n] Updated Catalan (Valencian) translation 2013-03-31 21:29:45 +02:00
ChangeLog Add note that ChangeLogs are no longer used 2009-04-19 15:19:15 -06:00
cs.po Updated Czech translation 2015-09-17 09:54:23 +02:00
da.po Updated Danish translation 2014-03-14 22:43:21 +01:00
de.po Updated German translation 2015-10-26 04:40:40 +00:00
dz.po svn path=/trunk/; revision=771 2007-03-26 07:59:56 +00:00
el.po Updated Greek translation 2015-02-27 12:32:02 +00:00
en_CA.po Ensure active tense of menu option in en_CA translation 2013-07-05 00:50:28 -04:00
en_GB.po Updated British English translation 2011-10-31 22:46:41 +00:00
eo.po Add Esperanto translation 2011-05-04 18:49:25 +02:00
es.po Updated Spanish translation 2015-10-21 14:29:03 +00:00
et.po [l10n] Updated Estonian translation 2010-12-20 15:26:08 +02:00
eu.po Updated Basque language 2010-10-30 17:41:18 +02:00
fa.po Updated Persian Translations 2012-03-31 14:18:32 +04:30
fi.po Updated Finnish translation 2015-10-21 07:28:33 +00:00
fr.po Updated French translation 2015-10-21 08:41:41 +00:00
gd.po Updated Scottish Gaelic translation 2015-03-28 11:23:27 +00:00
gl.po Updated Galician translations 2014-01-03 02:23:02 +01:00
gu.po Added translations done by CDAC after review 2008-09-04 13:26:42 +00:00
he.po Updated Hebrew translation. 2012-12-28 14:33:58 +02:00
hu.po Updated Hungarian translation 2015-09-17 15:01:30 +00:00
id.po Updated Indonesian translation 2015-09-20 06:28:30 +00:00
is.po Updated Icelandic translation 2015-04-22 10:15:44 +00:00
it.po Updated Italian translation 2015-10-20 17:08:22 +00:00
ja.po l10n: Update Japanese translation 2013-05-08 23:26:38 +09:00
kk.po Updated Kazakh translation 2015-07-26 15:42:19 +00:00
ko.po Updated Korean translation 2015-10-05 01:37:05 +09:00
LINGUAS Added Bosnian translation 2015-03-13 23:44:37 +00:00
lt.po Updated Lithuanian translation 2015-09-19 18:17:05 +03:00
lv.po Updated Latvian translation 2015-08-03 21:07:35 +03:00
mk.po 2007-04-07 Jovan Naumovski <jovanna@svn.gnome.org> *mk.po: Updated Macedonian translation. 2007-04-07 00:18:01 +00:00
ml.po Updated Malayalam Translation 2013-10-21 22:27:22 +05:30
nb.po Updated Norwegian bokmål translation from ProjectX. 2015-09-07 21:59:32 +02:00
ne.po Updated Nepali Translation 2008-02-17 12:45:47 +00:00
nl.po Updated Dutch translation Master 3.16 2015-03-13 16:59:06 +01:00
nn.po Updated Norwegian Nynorsk translation 2012-10-16 21:08:30 +02:00
oc.po Updated Occitan translation 2008-03-08 10:24:22 +00:00
pa.po Punjabi Translation updated 2015-07-27 22:59:12 -05:00
pl.po Updated Polish translation 2015-09-19 09:52:20 +02:00
POTFILES.in Detect Linux SWRaid members by querying mdadm (#756829) 2015-11-02 10:03:45 -07:00
POTFILES.skip Fixed bug #324220 with the following changes: 2008-04-21 15:22:00 +00:00
pt.po Updated Portuguese translation 2015-09-26 10:14:21 +00:00
pt_BR.po Updated Brazilian Portuguese translation 2015-10-20 16:29:18 +00:00
ro.po Updated Romanian Translation 2015-10-20 18:56:12 +02:00
ru.po Updated Russian translation 2015-09-20 20:54:07 +00:00
rw.po Added new Language, Kinyarwanda (rw), to this package 2005-04-01 22:33:17 +00:00
si.po updated si.po 2008-01-23 02:57:08 +00:00
sk.po Updated Slovak translation 2015-09-17 16:31:05 +00:00
sl.po Updated Slovenian translation 2013-03-31 20:13:10 +02:00
sr.po Updated Serbian translation 2014-12-27 15:32:50 +01:00
sr@latin.po Updated Serbian translation 2014-12-27 15:32:50 +01:00
sv.po Updated Swedish translation 2015-10-21 21:53:34 +00:00
te.po Updated Telugu Translation 2012-04-02 17:43:28 +05:30
th.po Updated Thai translation 2015-04-07 12:46:02 +07:00
tr.po Updated Turkish translation 2015-02-16 13:15:50 +00:00
uk.po Updated Ukrainian translation 2015-10-22 17:13:01 +03:00
vi.po vi.po: Updated Vietnamese translation. 2006-09-02 08:43:39 +00:00
zh_CN.po Update Chinese translation 2012-07-17 21:40:49 +08:00
zh_HK.po Updated Traditional Chinese translation(Hong Kong and Taiwan) 2013-12-08 21:32:46 +08:00
zh_TW.po Updated Chinese (Taiwan) translation 2015-03-19 14:13:38 +00:00