23
BitRot detection in GlusterFS Venky Shankar Gaurav Garg

BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

BitRot detection in GlusterFS

Venky ShankarGaurav Garg

Page 2: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

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: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

OK, enough. Let’s get started...

Page 4: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

GlusterFS Quick Tour

Page 5: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

Where’s my data?

● Distributed● Local filesystem (brick)

○ XFS○ EXT3, EXT4○ BTRFS

● Prerequisite○ POSIX compatible○ Xattr support

Page 6: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

Understanding data corruption

Page 7: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

Corruption?How ?

● Direct “brick” manipulation○ Script bug○ Admin○ Malicious

Page 8: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

Corruption?How ?

(cont..)

● Silent corruption○ Disk itself

■ Firmware bug■ Mechanical wear■ Ageing

Page 9: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

Illustration

Page 10: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:
Page 11: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

Solution: Integrity checks

Page 12: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

Integrity CheckConsistency

● Track data modifications○ Checksum (signature)○ Persistent

● Verify during access○ Recompute and check

● Repair if corrupted

Page 13: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

Enough of theory, show me how it’s done.

Page 14: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

ImplementationConstraints on choices

● Big fat-file story● Deployments

○ Distribute + Replicate○ Stripe, now [3.7+] sharding○ Erasure coded

Page 15: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

ImplementationConstraints on choices (cotd..)

● In-band data signing○ Costly○ RMW cycle○ Degraded I/O performance

● Verification○ “Ditto”

Page 16: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

ImplementationDetails

● Out-of-band data signing○ Daemon○ Asynchronous

■ Policy■ Strong hash (reason ?)

● Verification○ Daemon (scrubber)○ On-demand○ Pre-scrubbed

Page 17: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

ImplementationDetails (cotd..)

● Object versioning○ Versioned upon modification○ Versioning xattr (64 bit)○ Reflect “object state”

● Signature○ xattr○ Attached to a “version”

Page 18: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

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: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

Use cases

Page 20: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

Use Cases● Small files● Long lived data

○ Archival storage

○ WORM workload

Page 21: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

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: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

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: BitRot detection in GlusterFS - events.static.linuxfound.org · Gaurav Garg. We are, Gluster developers at Red Hat... participate in meetups, open source events... hang out on #freenode:

Q & A