On 26 April 2016 at 09:48, Andreas Beckmann <a...@debian.org> wrote:
> On Sun, 10 Jan 2016 02:21:48 +0100 Cyril Brulebois <k...@debian.org> wrote:
>
>> > I guess it should run mkfs.ext4 in non-interactive "yes, really do it and
>> > don't ask me any questions" mode or something like that.
>>
>> That's unfortunately a known issue but noone has taken the time to fix
>> it yet… :(
>>
>> Possibly to be fixed in partman-ext3's commit.d/format_ext3 which I
>> believe is what we're using even if we're now using ext4.
>
> That was #767682, and is already fixed in partman-ext3 in stretch.
>
>> [ To be backported to stable when fixed, too… ]
>
> I filed a PU request for this: #822678, but wouldn't mind if the D-I
> team takes over from here ...

Rather than a per-filesystem partman-fs fix, I'd like to propose the
following general policy:

user chooses a partition
if there is already a filesystem
    possibly notify "this partition is already in use, really wipe it out?"
    if yes then
       use wipefs -a to remove all the magic numbers from that filesystem.
else....what should the alternative be?

Old backup superblocks still cause weird problems with btrfs, for
example, and I've read it's also an issue for zfs.  Isn't it also
advantageous to wipe out ext4 magic numbers and backup superblocks
when making a fresh start, because this gives tools like testdisk and
photorec their best chance of success if something, or someone wipes
out the partition table?

For completeness, this would also need to be implemented when starting
with a fresh partition table.  eg: wipefs -a each existing partition,
then make a new MBR/GPT.  Additionally, it might be wise to wipefs -a
the raw device, in case an fs was used on it without a partition
table...

I am willing to work on this wipefs solution.

What do you think?
Nicholas

Reply via email to