Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
分散ストレージCephのデータ破壊検知修復機能は本当に動作するのか
Search
Satoru Takeuchi
PRO
December 11, 2023
Technology
0
250
分散ストレージCephのデータ破壊検知修復機能は本当に動作するのか
以下動画のテキストです
https://youtu.be/uN_Gn-bfiSI
Satoru Takeuchi
PRO
December 11, 2023
Tweet
Share
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
小学校5,6年生向けキャリア教育 大人になるまでの道
sat
PRO
8
3.4k
ファイルシステムの不整合
sat
PRO
2
120
書籍執筆での生成AIの活用
sat
PRO
2
430
ChatGPTに従って体調管理2026
sat
PRO
0
170
eBPF
sat
PRO
1
130
waruiBPF
sat
PRO
0
120
eBPFとwaruiBPF
sat
PRO
5
4.2k
Pythonのコードの気になる行でスタックトレースを出す
sat
PRO
1
110
ソースコードを読むときの思考プロセスの例 ~markdownのレンダリング方法を知りたかった2 markdownパッケージ~
sat
PRO
0
220
Other Decks in Technology
See All in Technology
親子 or ペアで Mashup for the Future! しゃべって楽しむ 初手AI駆動でものづくり体験
hiroramos4
PRO
0
130
チームのモメンタムに投資せよ! 不確実性と共存しながら勢いを生み出す3つの実践
kakehashi
PRO
1
110
Yahoo!ショッピングのレコメンデーション・システムにおけるML実践の一例
lycorptech_jp
PRO
1
210
Cortex Code CLI と一緒に進めるAgentic Data Engineering
__allllllllez__
0
290
Claude Code Skills 勉強会 (DevelersIO向けに調整済み) / claude code skills for devio
masahirokawahara
1
21k
Everything Claude Code を眺める
oikon48
7
4.4k
OCHaCafe S11 #2 コンテナ時代の次の一手:Wasm 最前線
oracle4engineer
PRO
2
130
OSC仙台プレ勉強会 AlmaLinuxとは
koedoyoshida
0
170
Go標準パッケージのI/O処理をながめる
matumoto
0
210
今のWordPress の制作手法ってなにがあんねん?(改) / What’s the Deal with WordPress Development These Days?
tbshiki
0
460
Google系サービスで文字起こしから勝手にカレンダーを埋めるエージェントを作った話
risatube
0
180
PMとしての意思決定とAI活用状況について
lycorptech_jp
PRO
0
130
Featured
See All Featured
Skip the Path - Find Your Career Trail
mkilby
1
79
The Spectacular Lies of Maps
axbom
PRO
1
620
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
The Cult of Friendly URLs
andyhume
79
6.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
780
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
110
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
770
Building Applications with DynamoDB
mza
96
7k
RailsConf 2023
tenderlove
30
1.4k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
63
51k
Transcript
分散ストレージCephの データ破壊検知&修復機能は 本当に動作するのか Dec, 11st, 2023 Satoru Takeuchi X: satoru_takeuchi
今回話すこと • 分散ストレージCephのデータ破壊検知&修復機能の動作確認 ◦ レプリカが2個以上ある状態で1つのレプリカが壊れても、正しいデータから修復できる ◦ …という触れ込みだが、本当なのだろうか ? • 「その63
ディスクI/O障害のエミュレーション ~既存ターゲット編~」を見ていると理解 しやすい ◦ 軽い事例紹介なので、難しいところは雰囲気を理解するだけで OK
Cephのアーキテクチャ node node node disk OSD disk OSD disk OSD
RADOS(独自インタフェースのオブジェクトストレージ ) ファイルシステム ブロックデバイス S3互換 オブジェクトストレージ
実験に使ったCephクラスタ node disk RADOS ファイル ファイル /dev/loop0 /dev/loop1 dust0 dust1
OSD0 OSD1
オブジェクトを作成 $ cat /tmp/test.data Hello Ceph world! $ rados -p
replicapool put test-object test.data RADOS /dev/loop0 /dev/loop1 dust0 dust1 OSD0 OSD1 データ データ write write
GETする場合に読むOSDを得る $ ceph pg ls-by-pool replicapool PG OBJECTS … UP
ACTING … 1.a 1 … [1,0]p1 [1,0]p1 … オブジェクトを読み出すのは dust0上のOSD1から RADOS /dev/loop0 /dev/loop1 dust0 dust1 OSD0 OSD1 データ データ read
オブジェクトの位置を知る • stringsコマンドを使ってそれっぽいデータがあるセクタを疑似不良セクタとする ◦ 📝 本当はOSDの中にあるRocksDBを走査してセクタ番号を求めます $ sudo strings -t
d /dev/mapper/dust1 | grep "Hello Ceph world!" 4616192 Hello Ceph world! ^C $ echo $((4616192/512)) 9016
疑似不良セクタを設定 $ sudo dmsetup message dust1 0 addbadblock 9016 0
$ sudo dmsetup message dust1 0 enable RADOS /dev/loop0 /dev/loop1 dust0 dust1 OSD0 OSD1 データ データ readするとI/Oエラー発生 データ
オブジェクトをGETすると中身は正しい $ rados -p replicapool get test-object /tmp/out.data $ cat
/tmp/out.data Hello Ceph world! RADOS /dev/loop0 /dev/loop1 dust0 dust1 OSD0 OSD1 データ データ read データ readするとI/Oエラー発生 したはずだが…
OSDのログにデータを修復した痕跡が出ている … _aio_thread got r=-5 ((5) Input/output error) … _aio_thread
translating the error to EIO for upper layer … log [ERR] : 1.a missing primary copy of 1:5756f1fd:::test-object:head, will try copies on 0 RADOS /dev/loop0 /dev/loop1 dust0 dust1 OSD0 OSD1 データ データ データ
何が起きたか RADOS /dev/loop0 /dev/loop1 dust0 dust1 OSD0 OSD1 データ データ
read データ
何が起きたか RADOS /dev/loop0 /dev/loop1 dust0 dust1 OSD0 OSD1 データ データ
I/Oエラー発生 データ破壊検知
何が起きたか RADOS /dev/loop0 /dev/loop1 dust0 dust1 OSD0 OSD1 データ データ
正しいデータをコピー
何が起きたか RADOS /dev/loop0 /dev/loop1 dust0 dust1 OSD0 OSD1 データ データ
渡す
おわり • Cephのデータ破壊検知&修復機能は仕様通り機能することを確認した • こういうことを楽々試せるdm-dustは便利