Glusterfs Session #16
Self-heal daemon ( for replication)
ravishankar.n@pavilion.io
Agenda
- Intro to self-heal daemon (shd)
- Types of crawl in shd
- Code walkthrough
Intro to self-heal daemon (shd)
- What is it and why do we need it?
client-side heal (vs) shd heal
- Who manages it
root 10181 0.0 0.0 794532 8820 ? Ssl 20:10 0:00 /usr/local/sbin/
glusterfs -s localhost --volfile-id shd/testvol
-p /var/run/
gluster/shd/testvol/testvol-shd.pid -l /var/log/
glusterfs/glustershd.log -S /var/run/
gluster/1a8a981fe17db38b.socket
--xlator-option *replicate*.node-uuid=719e5dd8-f770-43ba-b924-817bcfc0ed06 --process-name
glustershd --client-pid=-6
- basically a client process (see volfile - has cluster/afr and protocol/client xlators)
- Managed by glusterd
xlators/mgmt/glusterd/src/glusterd-volgen.c
xlators/mgmt/glusterd/src/glusterd-shd-svc*
- controlled via CLI : gluster volume heal $VOLNAME {enable|disable}
Types of crawl in shd
- What is crawling?
- Scan through $LOCATION, identify what needs heal, and do the heal.
1. Full sweep / heal
LOCATION = full filesystem
gluster volume heal $VOLNAME full
2. Index sweep / heal
LOCATION = .glusterfs/indices/{dirty, xattrop, entry-changes/*}
Manual: gluster volume heal $VOLNAME (or)
Automatic: Once in every $heal-timeout seconds:
gluster volume set $VOLNAME cluster.heal-timeout $heal-timeout
Code walkthrough
~/workspace/glusterfs$ ls xlators/cluster/afr/src/afr-self-heal*
xlators/cluster/afr/src/afr-self-heald.c
xlators/cluster/afr/src/afr-self-heald.h
xlators/cluster/afr/src/afr-self-heal.h
xlators/cluster/afr/src/afr-self-heal-common.c
xlators/cluster/afr/src/afr-self-heal-metadata.c
xlators/cluster/afr/src/afr-self-heal-name.c
xlators/cluster/afr/src/afr-self-heal-data.c
xlators/cluster/afr/src/afr-self-heal-entry.c
Functions/ variables
client-side heal:
afr_throttled_selfheal(),background-self-heal-count, heal-wait-queue-length, afr_selfheal()
shd heal:
Manually via CLI:
afr_notify()-->afr_xl_op() --> afr_shd_index_healer_spawn() / afr_shd_full_healer_spawn()
Automatic periodic crawl:
afr_notify()->afr_selfheal_childup()-->afr_shd_index_healer_spawn()
struct afr_self_heald_t, struct subvol_healer

More Related Content

PDF
PFIセミナー資料 H27.10.22
PDF
2011-03 Developing Windows Exploits
PDF
Bigip exporter
PPTX
XPDDS18 Design Session: PCI pass-through with de-privileged QEMU - Xin Li, Ci...
DOCX
Cacti安装手册
TXT
Yg byev2e
PDF
Rop and it's friends
PDF
Unix v6 セミナー vol. 5
PFIセミナー資料 H27.10.22
2011-03 Developing Windows Exploits
Bigip exporter
XPDDS18 Design Session: PCI pass-through with de-privileged QEMU - Xin Li, Ci...
Cacti安装手册
Yg byev2e
Rop and it's friends
Unix v6 セミナー vol. 5

What's hot (16)

PPTX
PHP in 2018 - Q1 - AFUP Limoges
PDF
Ищем уязвимости нулевого дня в ядре Linux
PDF
Cassandra Day SV 2014: Basic Operations with Apache Cassandra
PDF
PDF
R-House (LSRC)
PDF
PGCon 2014 - What Do You Mean my Database Server Core Dumped? - How to Inspec...
PDF
Verifikation - Metoder og Libraries
PPTX
Creating "Secure" PHP applications, Part 2, Server Hardening
PPTX
Hunting Performance Problems in Node.js and beyond
PDF
The true story_of_hello_world
PDF
One definition rule - что это такое, и как с этим жить
PDF
Jvm的最小使用内存测试
PDF
Linux: the first second
PDF
Tensor Core
PPT
4.3 control mounting and unmounting of filesystems v2
PPT
101 4.3 control mounting and unmounting of filesystems v2
PHP in 2018 - Q1 - AFUP Limoges
Ищем уязвимости нулевого дня в ядре Linux
Cassandra Day SV 2014: Basic Operations with Apache Cassandra
R-House (LSRC)
PGCon 2014 - What Do You Mean my Database Server Core Dumped? - How to Inspec...
Verifikation - Metoder og Libraries
Creating "Secure" PHP applications, Part 2, Server Hardening
Hunting Performance Problems in Node.js and beyond
The true story_of_hello_world
One definition rule - что это такое, и как с этим жить
Jvm的最小使用内存测试
Linux: the first second
Tensor Core
4.3 control mounting and unmounting of filesystems v2
101 4.3 control mounting and unmounting of filesystems v2
Ad

Similar to Glusterfs session #16 self-heal daemon ( for replication) (20)

PDF
A little systemtap
PDF
A little systemtap
PDF
Multipath
PDF
Analyze Virtual Machine Overhead Compared to Bare Metal with Tracing
PDF
Sysdig
PDF
Reverse engineering Swisscom's Centro Grande Modem
PDF
Debugging Ruby
PDF
Php version 7
PDF
Nvidia smi.1
PDF
Linux Security APIs and the Chromium Sandbox
PDF
Crash_Report_Mechanism_In_Tizen
PDF
LAS16-403 - GDB Linux Kernel Awareness
PDF
LAS16-403: GDB Linux Kernel Awareness
PDF
Debugging Ruby Systems
PDF
Kernel Recipes 2015 - Kernel dump analysis
PDF
High Availability With DRBD & Heartbeat
PDF
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
PDF
Share the Experience of Using Embedded Development Board
POTX
Performance Tuning EC2 Instances
PPTX
HSA Kernel Code (KFD v0.6)
A little systemtap
A little systemtap
Multipath
Analyze Virtual Machine Overhead Compared to Bare Metal with Tracing
Sysdig
Reverse engineering Swisscom's Centro Grande Modem
Debugging Ruby
Php version 7
Nvidia smi.1
Linux Security APIs and the Chromium Sandbox
Crash_Report_Mechanism_In_Tizen
LAS16-403 - GDB Linux Kernel Awareness
LAS16-403: GDB Linux Kernel Awareness
Debugging Ruby Systems
Kernel Recipes 2015 - Kernel dump analysis
High Availability With DRBD & Heartbeat
[CB20] Vulnerabilities of Machine Learning Infrastructure by Sergey Gordeychik
Share the Experience of Using Embedded Development Board
Performance Tuning EC2 Instances
HSA Kernel Code (KFD v0.6)
Ad

More from Pranith Karampuri (16)

PDF
Glusterfs session #18 intro to fuse and its trade offs
PDF
Glusterfs session #12 locks xlator posixlk
PDF
Glusterfs session #17 self heal daemon data, metadata, entry healing
PDF
Glusterfs session #14 replication update fops
PDF
Glusterfs session #13 replication introduction
PDF
Glusterfs session #11 locks xlator entrylks
PDF
Glusterfs session #10 locks xlator inodelks
PDF
Glusterfs session #9 index xlator
PDF
Glusterfs session #8 memory tracking infra, io-threads
PDF
Glusterfs session #7 client, server interactions
PDF
Gluster dev session #6 understanding gluster's network communication layer
PDF
Glusterfs session #5 inode t, fd-t lifecycles
PDF
Glusterfs session #4 call frame and programming model
PDF
Gluster dev session #3 xlator interface
PDF
Glusterfs session #2 1 layer above disk filesystems
PDF
Glusterfs session #1 disk filesystems
Glusterfs session #18 intro to fuse and its trade offs
Glusterfs session #12 locks xlator posixlk
Glusterfs session #17 self heal daemon data, metadata, entry healing
Glusterfs session #14 replication update fops
Glusterfs session #13 replication introduction
Glusterfs session #11 locks xlator entrylks
Glusterfs session #10 locks xlator inodelks
Glusterfs session #9 index xlator
Glusterfs session #8 memory tracking infra, io-threads
Glusterfs session #7 client, server interactions
Gluster dev session #6 understanding gluster's network communication layer
Glusterfs session #5 inode t, fd-t lifecycles
Glusterfs session #4 call frame and programming model
Gluster dev session #3 xlator interface
Glusterfs session #2 1 layer above disk filesystems
Glusterfs session #1 disk filesystems

Recently uploaded (20)

PDF
IGGE1 Understanding the Self1234567891011
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
Computer Architecture Input Output Memory.pptx
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
HVAC Specification 2024 according to central public works department
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
Uderstanding digital marketing and marketing stratergie for engaging the digi...
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PDF
Trump Administration's workforce development strategy
PDF
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
PDF
International_Financial_Reporting_Standa.pdf
PPTX
20th Century Theater, Methods, History.pptx
IGGE1 Understanding the Self1234567891011
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Hazard Identification & Risk Assessment .pdf
Computer Architecture Input Output Memory.pptx
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 2).pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Share_Module_2_Power_conflict_and_negotiation.pptx
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
Weekly quiz Compilation Jan -July 25.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
HVAC Specification 2024 according to central public works department
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
Uderstanding digital marketing and marketing stratergie for engaging the digi...
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
Trump Administration's workforce development strategy
CISA (Certified Information Systems Auditor) Domain-Wise Summary.pdf
International_Financial_Reporting_Standa.pdf
20th Century Theater, Methods, History.pptx

Glusterfs session #16 self-heal daemon ( for replication)

  • 1. Glusterfs Session #16 Self-heal daemon ( for replication) ravishankar.n@pavilion.io
  • 2. Agenda - Intro to self-heal daemon (shd) - Types of crawl in shd - Code walkthrough
  • 3. Intro to self-heal daemon (shd) - What is it and why do we need it? client-side heal (vs) shd heal - Who manages it root 10181 0.0 0.0 794532 8820 ? Ssl 20:10 0:00 /usr/local/sbin/ glusterfs -s localhost --volfile-id shd/testvol -p /var/run/ gluster/shd/testvol/testvol-shd.pid -l /var/log/ glusterfs/glustershd.log -S /var/run/ gluster/1a8a981fe17db38b.socket --xlator-option *replicate*.node-uuid=719e5dd8-f770-43ba-b924-817bcfc0ed06 --process-name glustershd --client-pid=-6 - basically a client process (see volfile - has cluster/afr and protocol/client xlators) - Managed by glusterd xlators/mgmt/glusterd/src/glusterd-volgen.c xlators/mgmt/glusterd/src/glusterd-shd-svc* - controlled via CLI : gluster volume heal $VOLNAME {enable|disable}
  • 4. Types of crawl in shd - What is crawling? - Scan through $LOCATION, identify what needs heal, and do the heal. 1. Full sweep / heal LOCATION = full filesystem gluster volume heal $VOLNAME full 2. Index sweep / heal LOCATION = .glusterfs/indices/{dirty, xattrop, entry-changes/*} Manual: gluster volume heal $VOLNAME (or) Automatic: Once in every $heal-timeout seconds: gluster volume set $VOLNAME cluster.heal-timeout $heal-timeout
  • 5. Code walkthrough ~/workspace/glusterfs$ ls xlators/cluster/afr/src/afr-self-heal* xlators/cluster/afr/src/afr-self-heald.c xlators/cluster/afr/src/afr-self-heald.h xlators/cluster/afr/src/afr-self-heal.h xlators/cluster/afr/src/afr-self-heal-common.c xlators/cluster/afr/src/afr-self-heal-metadata.c xlators/cluster/afr/src/afr-self-heal-name.c xlators/cluster/afr/src/afr-self-heal-data.c xlators/cluster/afr/src/afr-self-heal-entry.c
  • 6. Functions/ variables client-side heal: afr_throttled_selfheal(),background-self-heal-count, heal-wait-queue-length, afr_selfheal() shd heal: Manually via CLI: afr_notify()-->afr_xl_op() --> afr_shd_index_healer_spawn() / afr_shd_full_healer_spawn() Automatic periodic crawl: afr_notify()->afr_selfheal_childup()-->afr_shd_index_healer_spawn() struct afr_self_heald_t, struct subvol_healer