zfs on gmirror slice

Freddie Cash fjwcash at gmail.com
Wed Sep 2 16:40:35 UTC 2009

On Wed, Sep 2, 2009 at 1:49 AM, Mark Stapper <stark at mapper.nl> wrote:

> Thomas Backman wrote:
> > On Sep 2, 2009, at 10:27 AM, Mark Stapper wrote:
>  >>
> > Nothing a LiveCD or something to that regard can't handle. Obviously
> > this doesn't work for everyone, but it should for many.
> Actually it won't because updating zfs comes with updating your world.
> After updating you world, you will be running a newer ZFS version then
> the one that come with the RELEASE install, hence the need to update
> your zfs filesystems. Incidentally, the livefs CD contains the "old" zfs
> version. You see where I'm going?

The new version of the ZFS tools (zpool/zfs) will work with older versions
of the on-disk formats (pool and filesystem).  Thus, you can boot into an
8.0 system while using ZFSv6 pool from a 7.2 system.  Upgrading the world
only upgrades the tools, it doesn't upgrade the on-disk format.

Once you *manually* upgrade your filesystems and pools to ZFSv13, then you
can no longer access them on older systems.

Thus, there's no issue.  You can start with a FreeBSD 7.x system running
ZFSv6, upgrade it via buildworld to FreeBSD 8.0, and continue running your
ZFSv6 pool and filesystems.  Sometime in the future, you can then upgrade
the pool and filesystems to ZFSv13, and continue on your merry way.

ZFS provides backward compatibility, and doesn't automatically upgrade your
pools or filesystems.

> > If ZFS finds a corrupted copy and a non-corrupted one in a mirrored
> > ZFS pool, it will repair the damage so that both copies are valid, so
> > yes, self-healing will indeed occur. :)

> I'm feeling Shakespearean again... My point was that I find
> "self-healing" too magic sounding. While indeed it means:"Automatic data
> error detection and rebuilding" or something along those lines. We don't
> call the automatic remapping of bad sectors in HDD's "self-healing" do we?
> Alas, I must admit that on file-system level, some "healing" does take
> place.

You should read some of the ZFS white papers and blog postings to better
understand what "self-healing" in ZFS is all about.  It's a lot more than
"automatically rebuild arrays" or "automatically re-map bad sectors".  And
it works at the individual file level (possibly the data block level)
instead of the "entire disk" level that gmirror works.

For fun, use dd to zero out some random sectors on a drive that's part of a
gmirror array and a ZFS mirror, and see what happens.  ;)

Freddie Cash
fjwcash at gmail.com

More information about the freebsd-stable mailing list