* data integrity in btrfs @ 2011-12-30 13:29 Jaromir Zdrazil 2011-12-30 13:38 ` Hugo Mills 2011-12-30 13:44 ` Kai Krakow 0 siblings, 2 replies; 3+ messages in thread From: Jaromir Zdrazil @ 2011-12-30 13:29 UTC (permalink / raw) To: linux-btrfs Hi again, I know that ZFS include data integrity verification against data corruption modes using propably SHA256. By sketchy readings at https://btrfs.wiki.kernel.org/index.html , http://en.wikipedia.org/wiki/Btrfs and other sources I have found just that there is Sha32C used and that it should be similar to ZFS. How are data faults detected and repaired ni BRTFS? If the answer could be simple and precize, I would be more than happy. Thank you! Gone to lunch ;O) Jaromir ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: data integrity in btrfs 2011-12-30 13:29 data integrity in btrfs Jaromir Zdrazil @ 2011-12-30 13:38 ` Hugo Mills 2011-12-30 13:44 ` Kai Krakow 1 sibling, 0 replies; 3+ messages in thread From: Hugo Mills @ 2011-12-30 13:38 UTC (permalink / raw) To: Jaromir Zdrazil; +Cc: linux-btrfs [-- Attachment #1: Type: text/plain, Size: 1742 bytes --] On Fri, Dec 30, 2011 at 02:29:46PM +0100, Jaromir Zdrazil wrote: > Hi again, > > I know that ZFS include data integrity verification against data corruption modes using propably SHA256. > > By sketchy readings at https://btrfs.wiki.kernel.org/index.html , http://en.wikipedia.org/wiki/Btrfs and other sources I have found just that there is Sha32C used and that it should be similar to ZFS. > > How are data faults detected and repaired ni BRTFS? If the answer could be simple and precize, I would be more than happy. > > Thank you! Gone to lunch ;O) Every 4k block in btrfs is checksummed (using CRC32, so it's not cryptographically robust against malicious modification, but should spot most random errors). If you use RAID-1 or RAID-10 storage, then you get two copies of each piece of data, stored on different devices. Each copy is independently checksummed. When data is read, the checksum is verified as well, and a failed checksum is logged to syslog. In this case, the filesystem will attempt to read the other copy. If both copies are bad, an I/O error is returned; if one of the copies is good, that data is returned. With recent kernels and an up-to-date userspace, there is a feature called scrub which will read both copies of all of the data blocks in the filesystem and compare them to each other. If there is a mismatch with a failed checksum, scrub will rewrite the broken block to fix it. Hugo. -- === Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- "Are you the man who rules the Universe?" "Well, I --- try not to." [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 190 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: data integrity in btrfs 2011-12-30 13:29 data integrity in btrfs Jaromir Zdrazil 2011-12-30 13:38 ` Hugo Mills @ 2011-12-30 13:44 ` Kai Krakow 1 sibling, 0 replies; 3+ messages in thread From: Kai Krakow @ 2011-12-30 13:44 UTC (permalink / raw) To: linux-btrfs As long as you create your data and metadata with a mirror policy, you can use btrfs scrubbing to find and correct broken data blocks. I think latest kernels also so this "repairing" online. It works by finding a mirrored block with correct checksum if the block in question has a bad checksum. Jaromir Zdrazil <jaromir.zdrazil@email.cz> schrieb: > Hi again, > > I know that ZFS include data integrity verification against data > corruption modes using propably SHA256. > > By sketchy readings at https://btrfs.wiki.kernel.org/index.html , > http://en.wikipedia.org/wiki/Btrfs and other sources I have found just > that there is Sha32C used and that it should be similar to ZFS. > > How are data faults detected and repaired ni BRTFS? If the answer could > be simple and precize, I would be more than happy. > > Thank you! Gone to lunch ;O) > > Jaromir > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-30 13:44 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-12-30 13:29 data integrity in btrfs Jaromir Zdrazil 2011-12-30 13:38 ` Hugo Mills 2011-12-30 13:44 ` Kai Krakow
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).