On 08/30/2012 04:22 PM, Anonymous wrote:
>> On 08/30/2012 12:07 PM, Anonymous wrote:
>>> Hi. I have a spare off the shelf consumer PC and was thinking about loading
>>> Solaris on it for a development box since I use Studio @work and like it
>>> better than gcc. I was thinking maybe it isn't so smart to use ZFS since it
>>> has only one drive. If ZFS detects something bad it might kernel panic and
>>> lose the whole system right? I realize UFS /might/ be ignorant of any
>>> corruption but it might be more usable and go happily on it's way without
>>> noticing? Except then I have to size all the partitions and lose out on
>>> compression etc. Any suggestions thankfully received.
>> Simply set copies=2 and go on your merry way. Works for me and protects
>> you from bit rot. 
> That sounds interesting. How does ZFS implement that? Does it make sure to
> keep the pieces of the duplicate on different parts of the drive?

ZFS allows to store up to 3 copies of a block. It does this normally for
metadata (stored in 3 copies, IRC) and it is an option for user data as
well (via the "copies" property). The block allocator tries to locate
the different copies on different vdevs, if possible, and falls back to
the same vdev if not possible (of course, the position is not identical,
that would kind of defeat the purpose).

If during read back one copy is found to be corrupted, the second copy
is read, checked and if it is valid, the original corrupted copy is
automatically repaired (rewritten) - that's the whole idea behind the
"self-healing" aspect of ZFS.

zfs-discuss mailing list

Reply via email to