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
220
分散ストレージ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
「Linux」という言葉が指すもの
sat
PRO
4
130
APIとABIの違い
sat
PRO
5
62
ファイルシステムへのアクセス方法
sat
PRO
0
26
ファイルシステム
sat
PRO
1
34
低レイヤソフトウェア技術者が YouTuberとして食っていこうとした話
sat
PRO
7
6.1k
ポーリングと割り込み
sat
PRO
1
81
Rook: Intro and Deep Dive With Ceph
sat
PRO
1
140
会社員しながら本を書いてきた知見の共有
sat
PRO
3
880
デバイスにアクセスするデバイスファイル
sat
PRO
1
62
Other Decks in Technology
See All in Technology
react-callを使ってダイヤログをいろんなとこで再利用しよう!
shinaps
1
240
AI開発ツールCreateがAnythingになったよ
tendasato
0
130
人工衛星のファームウェアをRustで書く理由
koba789
15
7.9k
Practical Agentic AI in Software Engineering
uzyn
0
110
5年目から始める Vue3 サイト改善 #frontendo
tacck
PRO
3
220
EncryptedSharedPreferences が deprecated になっちゃった!どうしよう! / Oh no! EncryptedSharedPreferences has been deprecated! What should I do?
yanzm
0
340
【NoMapsTECH 2025】AI Edge Computing Workshop
akit37
0
120
共有と分離 - Compose Multiplatform "本番導入" の設計指針
error96num
2
510
Snowflake Intelligenceにはこうやって立ち向かう!クラシルが考えるAI Readyなデータ基盤と活用のためのDataOps
gappy50
0
230
Aurora DSQLはサーバーレスアーキテクチャの常識を変えるのか
iwatatomoya
1
970
dbt開発 with Claude Codeのためのガードレール設計
10xinc
2
1.2k
ハードウェアとソフトウェアをつなぐ全てを内製している企業の E2E テストの作り方 / How to create E2E tests for a company that builds everything connecting hardware and software in-house
bitkey
PRO
1
130
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
173
14k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.1k
Typedesign – Prime Four
hannesfritz
42
2.8k
Site-Speed That Sticks
csswizardry
10
810
Building an army of robots
kneath
306
46k
Fireside Chat
paigeccino
39
3.6k
How to train your dragon (web standard)
notwaldorf
96
6.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
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は便利