Debian Bug report logs - #635273
zfsutils: mkfs.zfs should zero-out first and last 32 MiB

Package: zfsutils; Maintainer for zfsutils is GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>; Source for zfsutils is src:zfsutils.

Reported by: Jérémy Bobbio <lunar@debian.org>

Date: Sat, 23 Jul 2011 23:00:01 UTC

Severity: wishlist

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#635224; Package grub-pc. (Sat, 23 Jul 2011 23:00:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jérémy Bobbio <lunar@debian.org>:
New Bug report received and forwarded. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sat, 23 Jul 2011 23:00:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Jérémy Bobbio <lunar@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: grub-pc: `grub-probe --target=fs` detects UFS filesystem as ZFS
Date: Sun, 24 Jul 2011 00:57:23 +0200
[Message part 1 (text/plain, inline)]
Package: grub-pc
Version: 1.99-8
Severity: important
User: debian-bsd@lists.debian.org
Usertags: kfreebsd

Hi!

I have not been able to upgrade a minimial kfreebsd-i386 system from
squeeze to sid is due to `update-grub` being unable to complete. Tracing
the problem have shown that `grub-probe` actually detects the root UFS
filesystem as ZFS :

  $ df -h /boot
  Filesystem            Size  Used Avail Use% Mounted on
  /dev/ad0s1            738M  429M  250M  64% /

  $ mount | grep ' on / '
  /dev/ad0s1 on / (ufs, local)

  $ sudo grub-probe --device /dev/ad0s1 --target=fs
  zfs

Cheers,
-- 
Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#635224; Package grub-pc. (Sun, 24 Jul 2011 01:00:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 24 Jul 2011 01:00:03 GMT) Full text and rfc822 format available.

Message #10 received at 635224@bugs.debian.org (full text, mbox):

From: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>
To: Jérémy Bobbio <lunar@debian.org>, 635224@bugs.debian.org
Subject: Re: Bug#635224: grub-pc: `grub-probe --target=fs` detects UFS filesystem as ZFS
Date: Sun, 24 Jul 2011 02:56:19 +0200
[Message part 1 (text/plain, inline)]
On 24.07.2011 00:57, Jérémy Bobbio wrote:
> Package: grub-pc
> Version: 1.99-8
> Severity: important
> User: debian-bsd@lists.debian.org
> Usertags: kfreebsd
>
> Hi!
>
> I have not been able to upgrade a minimial kfreebsd-i386 system from
> squeeze to sid is due to `update-grub` being unable to complete. Tracing
> the problem have shown that `grub-probe` actually detects the root UFS
> filesystem as ZFS :
That means that you have enough of ZFS still alive on that partition for
GRUB to be able to read it.
>   $ df -h /boot
>   Filesystem            Size  Used Avail Use% Mounted on
>   /dev/ad0s1            738M  429M  250M  64% /
>
>   $ mount | grep ' on / '
>   /dev/ad0s1 on / (ufs, local)
>
>   $ sudo grub-probe --device /dev/ad0s1 --target=fs
>   zfs
>
> Cheers,
>
>
> _______________________________________________
> Pkg-grub-devel mailing list
> Pkg-grub-devel@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grub-devel


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#635224; Package grub-pc. (Sun, 24 Jul 2011 10:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jérémy Bobbio <lunar@debian.org>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 24 Jul 2011 10:33:04 GMT) Full text and rfc822 format available.

Message #15 received at 635224@bugs.debian.org (full text, mbox):

From: Jérémy Bobbio <lunar@debian.org>
To: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>
Cc: 635224@bugs.debian.org
Subject: Re: Bug#635224: grub-pc: `grub-probe --target=fs` detects UFS filesystem as ZFS
Date: Sun, 24 Jul 2011 12:31:00 +0200
[Message part 1 (text/plain, inline)]
On Sun, Jul 24, 2011 at 02:56:19AM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> > I have not been able to upgrade a minimial kfreebsd-i386 system from
> > squeeze to sid is due to `update-grub` being unable to complete. Tracing
> > the problem have shown that `grub-probe` actually detects the root UFS
> > filesystem as ZFS :
> That means that you have enough of ZFS still alive on that partition for
> GRUB to be able to read it.

Indeed. After trashing the partition fully, it detects UFS fine.

This is still a bug though, as would be pretty hard to zero the hard
drive of an already installed production system.

Cheers,
-- 
Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#635224; Package grub-pc. (Sun, 24 Jul 2011 10:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 24 Jul 2011 10:39:07 GMT) Full text and rfc822 format available.

Message #20 received at 635224@bugs.debian.org (full text, mbox):

From: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>
To: Jérémy Bobbio <lunar@debian.org>
Cc: 635224@bugs.debian.org
Subject: Re: Bug#635224: grub-pc: `grub-probe --target=fs` detects UFS filesystem as ZFS
Date: Sun, 24 Jul 2011 12:37:39 +0200
[Message part 1 (text/plain, inline)]
On 24.07.2011 12:31, Jérémy Bobbio wrote:
> On Sun, Jul 24, 2011 at 02:56:19AM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>>> I have not been able to upgrade a minimial kfreebsd-i386 system from
>>> squeeze to sid is due to `update-grub` being unable to complete. Tracing
>>> the problem have shown that `grub-probe` actually detects the root UFS
>>> filesystem as ZFS :
>> That means that you have enough of ZFS still alive on that partition for
>> GRUB to be able to read it.
> Indeed. After trashing the partition fully, it detects UFS fine.
>
> This is still a bug though, as would be pretty hard to zero the hard
> drive of an already installed production system.
>
It's not possible to distinguish whether ZFS or UFS a leftover. They may
both contain enough metadata to even access some files.

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#635224; Package grub-pc. (Sun, 24 Jul 2011 10:48:17 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jérémy Bobbio <lunar@debian.org>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 24 Jul 2011 10:48:25 GMT) Full text and rfc822 format available.

Message #25 received at 635224@bugs.debian.org (full text, mbox):

From: Jérémy Bobbio <lunar@debian.org>
To: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>
Cc: 635224@bugs.debian.org
Subject: Re: Bug#635224: grub-pc: `grub-probe --target=fs` detects UFS filesystem as ZFS
Date: Sun, 24 Jul 2011 12:45:46 +0200
[Message part 1 (text/plain, inline)]
On Sun, Jul 24, 2011 at 12:37:39PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> > This is still a bug though, as would be pretty hard to zero the hard
> > drive of an already installed production system.
> >
> It's not possible to distinguish whether ZFS or UFS a leftover. They may
> both contain enough metadata to even access some files.

If there is no other ways, then `update-grub` needs to check out what is
the filesystem used for `/boot` and use that. Otherwise this is likely
to break some system upgrades from Squeeze to Wheezy.

Cheers,
-- 
Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#635224; Package grub-pc. (Sun, 24 Jul 2011 10:57:44 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 24 Jul 2011 10:57:47 GMT) Full text and rfc822 format available.

Message #30 received at 635224@bugs.debian.org (full text, mbox):

From: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>
To: 635224@bugs.debian.org, Jérémy Bobbio <lunar@debian.org>
Subject: Re: Bug#635224: grub-pc: `grub-probe --target=fs` detects UFS filesystem as ZFS
Date: Sun, 24 Jul 2011 12:53:46 +0200
[Message part 1 (text/plain, inline)]
On 24.07.2011 12:45, Jérémy Bobbio wrote:
> On Sun, Jul 24, 2011 at 12:37:39PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>>> This is still a bug though, as would be pretty hard to zero the hard
>>> drive of an already installed production system.
>>>
>> It's not possible to distinguish whether ZFS or UFS a leftover. They may
>> both contain enough metadata to even access some files.
> If there is no other ways, then `update-grub` needs to check out what is
> the filesystem used for `/boot` and use that.
Which is subject to exactly the same problem.
>  Otherwise this is likely
> to break some system upgrades from Squeeze to Wheezy.
>
> Cheers,


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#635224; Package grub-pc. (Sun, 24 Jul 2011 15:03:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jérémy Bobbio <lunar@debian.org>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 24 Jul 2011 15:03:03 GMT) Full text and rfc822 format available.

Message #35 received at 635224@bugs.debian.org (full text, mbox):

From: Jérémy Bobbio <lunar@debian.org>
To: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>
Cc: 635224@bugs.debian.org
Subject: Re: Bug#635224: grub-pc: `grub-probe --target=fs` detects UFS filesystem as ZFS
Date: Sun, 24 Jul 2011 17:01:02 +0200
[Message part 1 (text/plain, inline)]
On Sun, Jul 24, 2011 at 12:53:46PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> >> It's not possible to distinguish whether ZFS or UFS a leftover. They may
> >> both contain enough metadata to even access some files.
> > If there is no other ways, then `update-grub` needs to check out what is
> > the filesystem used for `/boot` and use that.
>
> Which is subject to exactly the same problem.

Would you have anything else to suggest that could be done to enable
system upgrades to go through the end when encountering such situation?

Debian is known to offer an easy upgrade procedure. Even if Debian
GNU/kFreeBSD for Squeeze was only released as a "technology preview",
those system should not be a PITA to upgrade to Wheezy when it'll be
out.

Cheers,
-- 
Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#635224; Package grub-pc. (Sun, 24 Jul 2011 15:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 24 Jul 2011 15:21:03 GMT) Full text and rfc822 format available.

Message #40 received at 635224@bugs.debian.org (full text, mbox):

From: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>
To: Jérémy Bobbio <lunar@debian.org>, 635224@bugs.debian.org
Subject: Re: Bug#635224: grub-pc: `grub-probe --target=fs` detects UFS filesystem as ZFS
Date: Sun, 24 Jul 2011 17:18:45 +0200
[Message part 1 (text/plain, inline)]
On 24.07.2011 17:01, Jérémy Bobbio wrote:
> On Sun, Jul 24, 2011 at 12:53:46PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>>>> It's not possible to distinguish whether ZFS or UFS a leftover. They may
>>>> both contain enough metadata to even access some files.
>>> If there is no other ways, then `update-grub` needs to check out what is
>>> the filesystem used for `/boot` and use that.
>> Which is subject to exactly the same problem.
> Would you have anything else to suggest that could be done to enable
> system upgrades to go through the end when encountering such situation?
>
The problem is deeper than just GRUB. Once such situation arises you
need human intervention to find out which filesystem is a real one and
destroy the other one. Not performing such act and just mounting and
writing to filesystem will after some time destroy the other one. The
culprit in any case is the choice to make. It's better to prevent such
situation from arising in the first place by modifying the mkfs tools to
zero-out first and last 32 mebibytes.
> Debian is known to offer an easy upgrade procedure. Even if Debian
> GNU/kFreeBSD for Squeeze was only released as a "technology preview",
> those system should not be a PITA to upgrade to Wheezy when it'll be
> out.

> Cheers,


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>:
Bug#635224; Package grub-pc. (Sun, 24 Jul 2011 15:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jérémy Bobbio <lunar@debian.org>:
Extra info received and forwarded to list. Copy sent to GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>. (Sun, 24 Jul 2011 15:39:03 GMT) Full text and rfc822 format available.

Message #45 received at 635224@bugs.debian.org (full text, mbox):

From: Jérémy Bobbio <lunar@debian.org>
To: Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>
Cc: 635224@bugs.debian.org, control@bugs.debian.org
Subject: Re: Bug#635224: grub-pc: `grub-probe --target=fs` detects UFS filesystem as ZFS
Date: Sun, 24 Jul 2011 17:36:05 +0200
[Message part 1 (text/plain, inline)]
clone 635224 -1 -2
reassign -1 ufsutils
retitle -1 ufsutils: mkfs.ufs should zero-out first and last 32 MiB
severity -1 wishlist
reassign -2 zfsutils
retitle -2 zfsutils: mkfs.zfs should zero-out first and last 32 MiB
severity -2 wishlist
thanks

On Sun, Jul 24, 2011 at 05:18:45PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> On 24.07.2011 17:01, Jérémy Bobbio wrote:
> > On Sun, Jul 24, 2011 at 12:53:46PM +0200, Vladimir 'φ-coder/phcoder' Serbinenko wrote:
> >>>> It's not possible to distinguish whether ZFS or UFS a leftover. They may
> >>>> both contain enough metadata to even access some files.
> >>> If there is no other ways, then `update-grub` needs to check out what is
> >>> the filesystem used for `/boot` and use that.
> >> Which is subject to exactly the same problem.
> > Would you have anything else to suggest that could be done to enable
> > system upgrades to go through the end when encountering such situation?
> >
> The problem is deeper than just GRUB. Once such situation arises you
> need human intervention to find out which filesystem is a real one and
> destroy the other one. Not performing such act and just mounting and
> writing to filesystem will after some time destroy the other one. The
> culprit in any case is the choice to make. It's better to prevent such
> situation from arising in the first place by modifying the mkfs tools to
> zero-out first and last 32 mebibytes.

I just cloned this bug to both ufsutils and zfsutils. But unfortunately,
I have to insist:

> > Debian is known to offer an easy upgrade procedure. Even if Debian
> > GNU/kFreeBSD for Squeeze was only released as a "technology preview",
> > those system should not be a PITA to upgrade to Wheezy when it'll be
> > out.

What I have actually done was:

 1. Install Debian GNU/kFreeBSD using a daily build of d-i, and
    installing the system on ZFS.
 2. Re-install on the same hard disk the Squeeze version using
    UFS.
 3. Upgrade that last system to Debian unstable.

I can't imagine why doing so should result in upgrade failing. If the
system I am currently upgrading is running on top of UFS, I can't
see a valid rationale of why, in case of doubt, we could not tell
`update-grub` that it should use UFS to boot.

Cheers,
-- 
Jérémy Bobbio                        .''`. 
lunar@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
[signature.asc (application/pgp-signature, inline)]

Bug 635224 cloned as bugs 635272, 635273. Request was from Jérémy Bobbio <lunar@debian.org> to control@bugs.debian.org. (Sun, 24 Jul 2011 15:39:03 GMT) Full text and rfc822 format available.

Bug reassigned from package 'grub-pc' to 'zfsutils'. Request was from Jérémy Bobbio <lunar@debian.org> to control@bugs.debian.org. (Sun, 24 Jul 2011 15:39:09 GMT) Full text and rfc822 format available.

Bug No longer marked as found in versions grub2/1.99-8. Request was from Jérémy Bobbio <lunar@debian.org> to control@bugs.debian.org. (Sun, 24 Jul 2011 15:39:10 GMT) Full text and rfc822 format available.

Changed Bug title to 'zfsutils: mkfs.zfs should zero-out first and last 32 MiB' from 'grub-pc: `grub-probe --target=fs` detects UFS filesystem as ZFS' Request was from Jérémy Bobbio <lunar@debian.org> to control@bugs.debian.org. (Sun, 24 Jul 2011 15:39:10 GMT) Full text and rfc822 format available.

Severity set to 'wishlist' from 'important' Request was from Jérémy Bobbio <lunar@debian.org> to control@bugs.debian.org. (Sun, 24 Jul 2011 15:39:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#635273; Package zfsutils. (Tue, 02 Aug 2011 11:21:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Robert Millan <rmh@debian.org>:
Extra info received and forwarded to list. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Tue, 02 Aug 2011 11:21:21 GMT) Full text and rfc822 format available.

Message #60 received at 635273@bugs.debian.org (full text, mbox):

From: Robert Millan <rmh@debian.org>
To: Zach JL <xaque208@gmail.com>
Cc: 635273@bugs.debian.org
Subject: Re: Reworked ZFS support in D-I, testers wanted
Date: Tue, 2 Aug 2011 13:19:21 +0200
2011/8/2 Zach JL <xaque208@gmail.com>:
> ZFS partitions were detected as ext4.

Seems like #635273.  Did you create an ext4 and overwrite it with zfs
afterwards, or vice-versa?

-- 
Robert Millan




Information forwarded to debian-bugs-dist@lists.debian.org, GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>:
Bug#635273; Package zfsutils. (Thu, 04 Aug 2011 04:30:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Zach JL <xaque208@gmail.com>:
Extra info received and forwarded to list. Copy sent to GNU/kFreeBSD Maintainers <debian-bsd@lists.debian.org>. (Thu, 04 Aug 2011 04:30:03 GMT) Full text and rfc822 format available.

Message #65 received at 635273@bugs.debian.org (full text, mbox):

From: Zach JL <xaque208@gmail.com>
To: Robert Millan <rmh@debian.org>
Cc: 635273@bugs.debian.org
Subject: Re: Reworked ZFS support in D-I, testers wanted
Date: Wed, 3 Aug 2011 21:26:00 -0700
[Message part 1 (text/plain, inline)]
There may have been an ext4 partition there before, but most recently zfs
was put on those partitions.  Also, I had the installer write a
new partition table to the disks, and upon reboot still seemed to detect
ext4 instead of zfs.

-- 
Zach
[Message part 2 (text/html, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 14:14:14 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.