From: Ruediger Meier <sweet_f_a@gmx.de>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: BUG: wipefs dry run
Date: Wed, 10 May 2017 13:03:10 +0200 [thread overview]
Message-ID: <201705101303.10856.sweet_f_a@gmx.de> (raw)
In-Reply-To: <20170510103202.ssoqv7pzk5h2a24q@ws.net.home>
On Wednesday 10 May 2017, Karel Zak wrote:
> On Wed, May 10, 2017 at 11:54:50AM +0200, Ruediger Meier wrote:
> > I wonder why wipefs does not show all MBR and GPT signatures which
> > would be deleted by using "-fa".
> >
> > $ truncate -s 100M /tmp/CCC
> > $ ./sfdisk /tmp/CCC <<EOF
> >
> > > label: gpt
> > > label-id: 384A8F14-17FF-4782-A190-A5B858E3FCF0
> > > device: /tmp/CCC
> > > unit: sectors
> > > first-lba: 34
> > > last-lba: 204766
> > > EOF
> >
> > $ ./wipefs -fa --no-act /tmp/CCC
> > /tmp/CCC: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49
> > 20 50 41 52 54
> >
> > $ ./wipefs -fa /tmp/CCC
> > /tmp/CCC: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49
> > 20 50 41 52 54
> > /tmp/CCC: 8 bytes were erased at offset 0x063ffe00 (gpt): 45 46 49
> > 20 50 41 52 54
> > /tmp/CCC: 2 bytes were erased at offset 0x000001fe (PMBR): 55 aa
>
> This is not a bug, man wipefs:
>
> Note that some filesystems and some partition tables store
> more magic strings on the device. The wipefs command lists only the
> first offset where a magic string has been detected. The
> device is not scanned for additional magic strings for the same
> filesystem. It is possible that after a wipefs -o offset the same
> filesystem or partition table will still be visible because of
> another magic string on another offset.
I see.
>
> The "-a" writes zeros, resets the scanner and repeat scan again and
> again until nothing is found. I will add note about it to the man
> page...
Thanks. For me it's a bit hard to guess what wipefs would
actually do.
I have another issue, using wipefs on the same image like above:
$ ./wipefs -fa -t gpt /tmp/CCC
/tmp/CCC: 8 bytes were erased at offset 0x00000200 (gpt): 45 46 49 20 50 41 52 54
/tmp/CCC: 8 bytes were erased at offset 0x063ffe00 (gpt): 45 46 49 20 50 41 52 54
/tmp/CCC: 8 bytes were erased at offset 0x063ffe00 (gpt): 45 46 49 20 50 41 52 54
There are two duplicated lines in the output and the not-mentioned (P)MBR
is also removed.
> It would be probably possible to extend libblkid to work in some
> "ignore previous result" mode to to gather all permutation for the
> FS/RAID/etc, but it won't be trivial task...
This would be nice.
cu,
RUdi
next prev parent reply other threads:[~2017-05-10 11:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-10 9:54 BUG: wipefs dry run Ruediger Meier
2017-05-10 10:32 ` Karel Zak
2017-05-10 10:53 ` Karel Zak
2017-05-10 11:03 ` Ruediger Meier [this message]
2017-05-26 11:21 ` Karel Zak
2017-06-15 14:47 ` Ruediger Meier
2017-06-16 9:39 ` Karel Zak
2017-06-29 10:55 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201705101303.10856.sweet_f_a@gmx.de \
--to=sweet_f_a@gmx.de \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox