Victor Engle wrote:

> The best practices guide on opensolaris does recommend replicated
> pools even if your backend storage is redundant. There are at least 2
> good reasons for that. ZFS needs a replica for the self healing
> feature to work. Also there is no fsck like tool for ZFS so it is a
> good idea to make sure self healing can work.


NB. fsck is not needed for ZFS because the on-disk format is always
consistent.  This is orthogonal to hardware faults.

I understand that the on disk state is always consistent but the self
healing feature can correct blocks that have bad checksums if zfs is
able to retrieve the block from a good replica.

Yes.  That is how it works.  By default, metatadata is replicated.
For real data, you can use copies, mirroring, or raidz[12]

                                                 So even though the
filesystem is consistent, the data can be corrupt in non-redundant
pools.

No.  If the data is corrupt and cannot be reconstructed, it is lost.
Recall that UFS's fsck only corrects file system metadata, not real
data.  Most file systems which have any kind of preformance work this
way.  ZFS is safer, because of COW, ZFS won't overwrite existing data
leading to corruption -- but other file systems can (eg. UFS).

         I am unsure of what happens with a non-redundant pool when a
block has a bad checksum and perhaps you could clear that up. Does
this cause a problem for the pool or is it limited to the file or
files affected by the bad block and otherwise the pool is online and
healthy.

It depends on where the bad block is.  If it isn't being used, no foul[1].
If it is metadata, then we recover because of redundant metadata.  If it
is in a file with no redundancy (copies=1, by default) then an error will
be logged to FMA and the file name is visible to zpool status.  You can
decide if that file is important to you.

This is an area where there is continuing development, far beyond what
ZFS alone can do.  The ultimate goal is that we get to the point where
most faults can be tolerated.  No rest for the weary :-)

[1] this is different than "software RAID" systems which don't know if a
block is being used or not.  In ZFS, we only care about faults in blocks
which are being used, for the most part.
 -- richard
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to