From unknown Sun Jun 22 04:12:28 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36853: mklabel does not clear mdraid version 0.90 metadata Resent-From: Michael Hudson-Doyle Original-Sender: "Debbugs-submit" Resent-CC: bug-parted@gnu.org Resent-Date: Tue, 30 Jul 2019 09:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36853 X-GNU-PR-Package: parted X-GNU-PR-Keywords: To: 36853@debbugs.gnu.org X-Debbugs-Original-To: bug-parted@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156447939624702 (code B ref -1); Tue, 30 Jul 2019 09:37:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Jul 2019 09:36:36 +0000 Received: from localhost ([127.0.0.1]:49538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsOYd-0006QM-OV for submit@debbugs.gnu.org; Tue, 30 Jul 2019 05:36:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:50021) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsOIh-00061S-DM for submit@debbugs.gnu.org; Tue, 30 Jul 2019 05:20:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60478) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsOIg-00072o-1i for bug-parted@gnu.org; Tue, 30 Jul 2019 05:20:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_50,HTML_MESSAGE, RCVD_IN_DNSWL_HI,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsOIe-0007Ut-N6 for bug-parted@gnu.org; Tue, 30 Jul 2019 05:20:05 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:44727) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hsOIe-0007UQ-DV for bug-parted@gnu.org; Tue, 30 Jul 2019 05:20:04 -0400 Received: from mail-io1-f70.google.com ([209.85.166.70]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hsOIc-0007zq-Hc for bug-parted@gnu.org; Tue, 30 Jul 2019 09:20:02 +0000 Received: by mail-io1-f70.google.com with SMTP id n8so70679846ioo.21 for ; Tue, 30 Jul 2019 02:20:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=QrtnCyDyU9YvAiKUze13QQPFUsF9y4RXDcSmLBvYWQ8=; b=GSgZ6H6FmeRhgazvbneR915UczYlBEEKtgfNpmoopALBlRlf7rO5WSdEDgKXFlUPs6 jES8OzTnRoH8S1euZXxf3YkXa/FCsQ5sRSYLoOZfXYZGHdPN22Okev1qglzXpmX5OTIm rAJyEi7ERNJNv+sm9rRrh0lB6COTFW3LoBp0ibz42ogG/txpJk3nsW6lomG3eLqZv6nM /ann4ZNlapNh8l3foTLmnL54wRFC4k+CwcnIIrNHtdXgrArplPmrjmc77KNbTmA1z7ET uAh69whPQi7Eix0c497Si4ZQFrQLpYStH3Q7SuSNz3zJapN2c1CFL2fSP5D3N/I62ph1 ckDQ== X-Gm-Message-State: APjAAAVFhiNBSshD4avA06zBTJAYvXr0Utb09Yul5R/lBCaqAQJ4Qokx mCoqDWzGJ1/z75yx0HzGSJ84/p55O4Uev6pn60mTj98F5EZtpbR6pyjWf5tjydfqh1X6crsplVk PZv3iImAJI+U6Ibjb6/m/Dbw3VYQ8KJyMSBg1VkWyjCw2 X-Received: by 2002:a6b:c98c:: with SMTP id z134mr66646120iof.276.1564478401339; Tue, 30 Jul 2019 02:20:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBfVNY1Rj4nqg1RXxpM2hpdcz3j7M31L3VsMIXfyjBeauf3Mn9WH3bNm+cBKJK77JyWhNlZ8LEWHuFy5iTrA8= X-Received: by 2002:a6b:c98c:: with SMTP id z134mr66646098iof.276.1564478400959; Tue, 30 Jul 2019 02:20:00 -0700 (PDT) MIME-Version: 1.0 From: Michael Hudson-Doyle Date: Tue, 30 Jul 2019 21:19:49 +1200 Message-ID: Content-Type: multipart/alternative; boundary="0000000000005930fb058ee2836e" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 91.189.89.112 X-Spam-Score: -2.3 (--) X-Mailman-Approved-At: Tue, 30 Jul 2019 05:36:34 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --0000000000005930fb058ee2836e Content-Type: text/plain; charset="UTF-8" Chasing down a bug report https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1828558 where installing over a device previously used in a RAID array, I found that parted's mklabel does not erase mdraid metadata 0.90 metadata (and only that version). Here's my test script #!/bin/bash set -xeu parted --version rm -f image.img truncate -s 1G image.img n=$(uuidgen | cut -d- -f1) dev="$(losetup -Pf --show image.img)" mdadm --create --metadata 0.90 --force --level 1 -n 1 --assume-clean /dev/md/$n $dev mdadm --stop /dev/md/$n losetup -d $dev parted --script --align optimal image.img -- mklabel msdos wipefs image.img and here's the output on my system: + parted --version parted (GNU parted) 3.2 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by < http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>. + rm -f image.img + truncate -s 1G image.img ++ uuidgen ++ cut -d- -f1 + n=e0c43267 ++ losetup -Pf --show image.img + dev=/dev/loop44 + mdadm --create --metadata 0.90 --force --level 1 -n 1 --assume-clean /dev/md/e0c43267 /dev/loop44 mdadm: array /dev/md/e0c43267 started. + mdadm --stop /dev/md/e0c43267 mdadm: stopped /dev/md/e0c43267 + losetup -d /dev/loop44 + parted --script --align optimal image.img -- mklabel msdos + wipefs image.img DEVICE OFFSET TYPE UUID LABEL image.img 0x3fff0000 linux_raid_member 6dbbfe69-809c-7a77-14d5-894fb9296617 image.img 0x1fe dos Looking at ped_disk_clobber none of this is surprising: the 0.90 metadata is somewhere between 127 and 64 kiB from the end of the device and this isn't touched. If this is indeed deemed a bug it could be pragmatically fixed by wiping more from the end of the disk or more cleverly by using libblkid to locate and zap all superblocks. Cheers, mwh --0000000000005930fb058ee2836e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Chasing down a bug report=C2=A0https://bugs.launchpa= d.net/ubuntu/+source/ubiquity/+bug/1828558=C2=A0where installing over a= device previously used in a RAID array, I found that parted's mklabel = does not erase mdraid metadata 0.90 metadata (and only that version). Here&= #39;s my test script

#!/bin/bash
set -xeu
parted= --version
rm -f image.img
truncate -s 1G image.img
n=3D$(uuidgen = | cut -d- -f1)
dev=3D"$(losetup -Pf --show image.img)"
mdad= m --create --metadata 0.90 --force --level 1 -n 1 --assume-clean /dev/md/$n= $dev
mdadm --stop /dev/md/$n
losetup -d $dev
parted --script --al= ign optimal image.img -- =C2=A0mklabel msdos
wipefs image.img
<= div>
and here's the output on my system:

+ parted --version
parted (GNU parted) 3.2
Copyright (C) 201= 4 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or la= ter <http://gnu.org/license= s/gpl.html>.
This is free software: you are free to change and re= distribute it.
There is NO WARRANTY, to the extent permitted by law.
=
Written by <http://git.debian.org/?p=3Dparted/parted.git;a= =3Dblob_plain;f=3DAUTHORS>.
+ rm -f image.img
+ truncate -s 1G= image.img
++ uuidgen
++ cut -d- -f1
+ n=3De0c43267
++ losetup = -Pf --show image.img
+ dev=3D/dev/loop44
+ mdadm --create --metadata = 0.90 --force --level 1 -n 1 --assume-clean /dev/md/e0c43267 /dev/loop44
= mdadm: array /dev/md/e0c43267 started.
+ mdadm --stop /dev/md/e0c43267mdadm: stopped /dev/md/e0c43267
+ losetup -d /dev/loop44
+ parted -= -script --align optimal image.img -- mklabel msdos
+ wipefs image.imgDEVICE =C2=A0 =C2=A0OFFSET =C2=A0 =C2=A0 TYPE =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0UUID =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 LABEL
ima= ge.img 0x3fff0000 linux_raid_member 6dbbfe69-809c-7a77-14d5-894fb9296617 image.img 0x1fe =C2=A0 =C2=A0 =C2=A0dos=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0

Looking at ped_disk_clobber none of thi= s is surprising: the 0.90 metadata is somewhere between 127 and 64 kiB from= the end of the device and this isn't touched.

If this is indeed deemed a bug it could be pragmatically fixed by wiping m= ore from the end of the disk or more cleverly by using libblkid to locate a= nd zap all superblocks.

Cheers,
mwh
--0000000000005930fb058ee2836e-- From unknown Sun Jun 22 04:12:28 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Michael Hudson-Doyle Subject: bug#36853: closed (Re: bug#36853: mklabel does not clear mdraid version 0.90 metadata) Message-ID: References: <20190730172948.GB5383@lister.brianlane.com> X-Gnu-PR-Message: they-closed 36853 X-Gnu-PR-Package: parted Reply-To: 36853@debbugs.gnu.org Date: Tue, 30 Jul 2019 17:30:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1564507803-22209-1" This is a multi-part message in MIME format... ------------=_1564507803-22209-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #36853: mklabel does not clear mdraid version 0.90 metadata which was filed against the parted package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 36853@debbugs.gnu.org. --=20 36853: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D36853 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1564507803-22209-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 36853-done) by debbugs.gnu.org; 30 Jul 2019 17:29:59 +0000 Received: from localhost ([127.0.0.1]:51110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsVwk-0005lj-RI for submit@debbugs.gnu.org; Tue, 30 Jul 2019 13:29:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsVwi-0005lW-Ua for 36853-done@debbugs.gnu.org; Tue, 30 Jul 2019 13:29:57 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 78F6030BC58B; Tue, 30 Jul 2019 17:29:51 +0000 (UTC) Received: from lister.brianlane.com (ovpn-112-44.phx2.redhat.com [10.3.112.44]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D4E6F60603; Tue, 30 Jul 2019 17:29:50 +0000 (UTC) Date: Tue, 30 Jul 2019 10:29:48 -0700 From: "Brian C. Lane" To: Michael Hudson-Doyle Subject: Re: bug#36853: mklabel does not clear mdraid version 0.90 metadata Message-ID: <20190730172948.GB5383@lister.brianlane.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 30 Jul 2019 17:29:51 +0000 (UTC) X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 36853-done Cc: 36853-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) On Tue, Jul 30, 2019 at 09:19:49PM +1200, Michael Hudson-Doyle wrote: > Chasing down a bug report > https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1828558 where > installing over a device previously used in a RAID array, I found that > parted's mklabel does not erase mdraid metadata 0.90 metadata (and only > that version). Here's my test script This is working as expected, parted tries not to touch more than it needs to and this situation will often come up when you re-partition a disk using the same values as a previous installation. You need to use something like wipefs on the disk before creating the new partitions. Thanks, -- Brian C. Lane (PST8PDT) - weldr.io - lorax - parted ------------=_1564507803-22209-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Jul 2019 09:36:36 +0000 Received: from localhost ([127.0.0.1]:49538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsOYd-0006QM-OV for submit@debbugs.gnu.org; Tue, 30 Jul 2019 05:36:36 -0400 Received: from lists.gnu.org ([209.51.188.17]:50021) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hsOIh-00061S-DM for submit@debbugs.gnu.org; Tue, 30 Jul 2019 05:20:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60478) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsOIg-00072o-1i for bug-parted@gnu.org; Tue, 30 Jul 2019 05:20:07 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_50,HTML_MESSAGE, RCVD_IN_DNSWL_HI,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsOIe-0007Ut-N6 for bug-parted@gnu.org; Tue, 30 Jul 2019 05:20:05 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:44727) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hsOIe-0007UQ-DV for bug-parted@gnu.org; Tue, 30 Jul 2019 05:20:04 -0400 Received: from mail-io1-f70.google.com ([209.85.166.70]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hsOIc-0007zq-Hc for bug-parted@gnu.org; Tue, 30 Jul 2019 09:20:02 +0000 Received: by mail-io1-f70.google.com with SMTP id n8so70679846ioo.21 for ; Tue, 30 Jul 2019 02:20:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=QrtnCyDyU9YvAiKUze13QQPFUsF9y4RXDcSmLBvYWQ8=; b=GSgZ6H6FmeRhgazvbneR915UczYlBEEKtgfNpmoopALBlRlf7rO5WSdEDgKXFlUPs6 jES8OzTnRoH8S1euZXxf3YkXa/FCsQ5sRSYLoOZfXYZGHdPN22Okev1qglzXpmX5OTIm rAJyEi7ERNJNv+sm9rRrh0lB6COTFW3LoBp0ibz42ogG/txpJk3nsW6lomG3eLqZv6nM /ann4ZNlapNh8l3foTLmnL54wRFC4k+CwcnIIrNHtdXgrArplPmrjmc77KNbTmA1z7ET uAh69whPQi7Eix0c497Si4ZQFrQLpYStH3Q7SuSNz3zJapN2c1CFL2fSP5D3N/I62ph1 ckDQ== X-Gm-Message-State: APjAAAVFhiNBSshD4avA06zBTJAYvXr0Utb09Yul5R/lBCaqAQJ4Qokx mCoqDWzGJ1/z75yx0HzGSJ84/p55O4Uev6pn60mTj98F5EZtpbR6pyjWf5tjydfqh1X6crsplVk PZv3iImAJI+U6Ibjb6/m/Dbw3VYQ8KJyMSBg1VkWyjCw2 X-Received: by 2002:a6b:c98c:: with SMTP id z134mr66646120iof.276.1564478401339; Tue, 30 Jul 2019 02:20:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBfVNY1Rj4nqg1RXxpM2hpdcz3j7M31L3VsMIXfyjBeauf3Mn9WH3bNm+cBKJK77JyWhNlZ8LEWHuFy5iTrA8= X-Received: by 2002:a6b:c98c:: with SMTP id z134mr66646098iof.276.1564478400959; Tue, 30 Jul 2019 02:20:00 -0700 (PDT) MIME-Version: 1.0 From: Michael Hudson-Doyle Date: Tue, 30 Jul 2019 21:19:49 +1200 Message-ID: Subject: mklabel does not clear mdraid version 0.90 metadata To: bug-parted@gnu.org Content-Type: multipart/alternative; boundary="0000000000005930fb058ee2836e" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 91.189.89.112 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 30 Jul 2019 05:36:34 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --0000000000005930fb058ee2836e Content-Type: text/plain; charset="UTF-8" Chasing down a bug report https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1828558 where installing over a device previously used in a RAID array, I found that parted's mklabel does not erase mdraid metadata 0.90 metadata (and only that version). Here's my test script #!/bin/bash set -xeu parted --version rm -f image.img truncate -s 1G image.img n=$(uuidgen | cut -d- -f1) dev="$(losetup -Pf --show image.img)" mdadm --create --metadata 0.90 --force --level 1 -n 1 --assume-clean /dev/md/$n $dev mdadm --stop /dev/md/$n losetup -d $dev parted --script --align optimal image.img -- mklabel msdos wipefs image.img and here's the output on my system: + parted --version parted (GNU parted) 3.2 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by < http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>. + rm -f image.img + truncate -s 1G image.img ++ uuidgen ++ cut -d- -f1 + n=e0c43267 ++ losetup -Pf --show image.img + dev=/dev/loop44 + mdadm --create --metadata 0.90 --force --level 1 -n 1 --assume-clean /dev/md/e0c43267 /dev/loop44 mdadm: array /dev/md/e0c43267 started. + mdadm --stop /dev/md/e0c43267 mdadm: stopped /dev/md/e0c43267 + losetup -d /dev/loop44 + parted --script --align optimal image.img -- mklabel msdos + wipefs image.img DEVICE OFFSET TYPE UUID LABEL image.img 0x3fff0000 linux_raid_member 6dbbfe69-809c-7a77-14d5-894fb9296617 image.img 0x1fe dos Looking at ped_disk_clobber none of this is surprising: the 0.90 metadata is somewhere between 127 and 64 kiB from the end of the device and this isn't touched. If this is indeed deemed a bug it could be pragmatically fixed by wiping more from the end of the disk or more cleverly by using libblkid to locate and zap all superblocks. Cheers, mwh --0000000000005930fb058ee2836e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Chasing down a bug report=C2=A0https://bugs.launchpa= d.net/ubuntu/+source/ubiquity/+bug/1828558=C2=A0where installing over a= device previously used in a RAID array, I found that parted's mklabel = does not erase mdraid metadata 0.90 metadata (and only that version). Here&= #39;s my test script

#!/bin/bash
set -xeu
parted= --version
rm -f image.img
truncate -s 1G image.img
n=3D$(uuidgen = | cut -d- -f1)
dev=3D"$(losetup -Pf --show image.img)"
mdad= m --create --metadata 0.90 --force --level 1 -n 1 --assume-clean /dev/md/$n= $dev
mdadm --stop /dev/md/$n
losetup -d $dev
parted --script --al= ign optimal image.img -- =C2=A0mklabel msdos
wipefs image.img
<= div>
and here's the output on my system:

+ parted --version
parted (GNU parted) 3.2
Copyright (C) 201= 4 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or la= ter <http://gnu.org/license= s/gpl.html>.
This is free software: you are free to change and re= distribute it.
There is NO WARRANTY, to the extent permitted by law.
=
Written by <http://git.debian.org/?p=3Dparted/parted.git;a= =3Dblob_plain;f=3DAUTHORS>.
+ rm -f image.img
+ truncate -s 1G= image.img
++ uuidgen
++ cut -d- -f1
+ n=3De0c43267
++ losetup = -Pf --show image.img
+ dev=3D/dev/loop44
+ mdadm --create --metadata = 0.90 --force --level 1 -n 1 --assume-clean /dev/md/e0c43267 /dev/loop44
= mdadm: array /dev/md/e0c43267 started.
+ mdadm --stop /dev/md/e0c43267mdadm: stopped /dev/md/e0c43267
+ losetup -d /dev/loop44
+ parted -= -script --align optimal image.img -- mklabel msdos
+ wipefs image.imgDEVICE =C2=A0 =C2=A0OFFSET =C2=A0 =C2=A0 TYPE =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0UUID =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 LABEL
ima= ge.img 0x3fff0000 linux_raid_member 6dbbfe69-809c-7a77-14d5-894fb9296617 image.img 0x1fe =C2=A0 =C2=A0 =C2=A0dos=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0

Looking at ped_disk_clobber none of thi= s is surprising: the 0.90 metadata is somewhere between 127 and 64 kiB from= the end of the device and this isn't touched.

If this is indeed deemed a bug it could be pragmatically fixed by wiping m= ore from the end of the disk or more cleverly by using libblkid to locate a= nd zap all superblocks.

Cheers,
mwh
--0000000000005930fb058ee2836e-- ------------=_1564507803-22209-1--