Download - Bit rot detection-lce-2015
![Page 1: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/1.jpg)
BitRot detection in GlusterFS
Venky ShankarGaurav Garg
![Page 2: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/2.jpg)
We are, Gluster developers at Red Hat
... participate in meetups, open source events
... hang out on #freenode: gluster, gluster-dev nick: overclk, ggarg... interact with community: [email protected] [email protected]
![Page 3: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/3.jpg)
OK, enough. Let’s get started...
![Page 4: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/4.jpg)
GlusterFS Quick Tour
![Page 5: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/5.jpg)
Where’s my data?
● Distributed● Local filesystem (brick)
○ XFS○ EXT3, EXT4○ BTRFS
● Prerequisite○ POSIX compatible○ Xattr support
![Page 6: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/6.jpg)
Understanding data corruption
![Page 7: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/7.jpg)
Corruption?How ?
● Direct “brick” manipulation○ Script bug○ Admin○ Malicious
![Page 8: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/8.jpg)
Corruption?How ?
(cont..)
● Silent corruption○ Disk itself
■ Firmware bug■ Mechanical wear■ Ageing
![Page 9: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/9.jpg)
Illustration
![Page 10: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/10.jpg)
![Page 11: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/11.jpg)
Solution: Integrity checks
![Page 12: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/12.jpg)
Integrity CheckConsistency
● Track data modifications○ Checksum (signature)○ Persistent
● Verify during access○ Recompute and check
● Repair if corrupted
![Page 13: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/13.jpg)
Enough of theory, show me how it’s done.
![Page 14: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/14.jpg)
ImplementationConstraints on choices
● Big fat-file story● Deployments
○ Distribute + Replicate○ Stripe, now [3.7+] sharding○ Erasure coded
![Page 15: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/15.jpg)
ImplementationConstraints on choices (cotd..)
● In-band data signing○ Costly○ RMW cycle○ Degraded I/O performance
● Verification○ “Ditto”
![Page 16: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/16.jpg)
ImplementationDetails
● Out-of-band data signing○ Daemon○ Asynchronous
■ Policy■ Strong hash (reason ?)
● Verification○ Daemon (scrubber)○ On-demand○ Pre-scrubbed
![Page 17: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/17.jpg)
ImplementationDetails (cotd..)
● Object versioning○ Versioned upon modification○ Versioning xattr (64 bit)○ Reflect “object state”
● Signature○ xattr○ Attached to a “version”
![Page 18: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/18.jpg)
ImplementationDetails (cotd..)
● Integrity checking○ Periodic
■ daily, weekly, etc..○ Filesystem scan
■ Signature mismates■ Matching version
○ QoS■ Controlled crunching
● Corrupted objects○ Denies access (EIO)○ Repairable
■ Replica, Codes
![Page 19: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/19.jpg)
Use cases
![Page 20: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/20.jpg)
Use Cases● Small files● Long lived data
○ Archival storage
○ WORM workload
![Page 21: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/21.jpg)
Future
● Replica consistency● Metadata checksumming● Offloading
○ BTRFS● Sharding adaption● GlusterFS 4.0 [Interesting!]
○ In-band (weaker hash)○ Checksum everything○ Default○ Lost (phantom) writes
![Page 22: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/22.jpg)
3.7
● Bitrot detection● No recovery● In comes sharding
3.7.2
● Recovery support
3.7.4
● Bug fixes● Scrub status
3.8
● Sharding ready● Bitrot adaption
4.0
● Hell of a change● Sharding by default● Checksum everything
![Page 23: Bit rot detection-lce-2015](https://reader030.vdocuments.us/reader030/viewer/2022032711/58ef01191a28ab466d8b458d/html5/thumbnails/23.jpg)
Q & A