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
210
分散ストレージ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
Rook: Intro and Deep Dive With Ceph
sat
PRO
1
110
会社員しながら本を書いてきた知見の共有
sat
PRO
3
790
デバイスにアクセスするデバイスファイル
sat
PRO
1
38
ファイルシステムのデータを ブロックデバイスへの操作で変更
sat
PRO
1
32
デバイスドライバ
sat
PRO
0
49
マルチスレッドの実現方法 ~カーネルスレッドとユーザスレッド~
sat
PRO
2
120
共有メモリ
sat
PRO
3
71
マルチスレッドプログラム
sat
PRO
3
59
Linuxのブートプロセス initramfs編
sat
PRO
2
89
Other Decks in Technology
See All in Technology
2025-07-06 QGIS初級ハンズオン「はじめてのQGIS」
kou_kita
0
180
Lufthansa ®️ USA Contact Numbers: Complete 2025 Support Guide
lufthanahelpsupport
0
220
Delta airlines®️ USA Contact Numbers: Complete 2025 Support Guide
airtravelguide
0
340
CDKTFについてざっくり理解する!!~CloudFormationからCDKTFへ変換するツールも作ってみた~
masakiokuda
1
180
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
54
21k
Enhancing SaaS Product Reliability and Release Velocity through Optimized Testing Approach
ropqa
1
240
TableauLangchainとは何か?
cielo1985
1
120
タイミーのデータモデリング事例と今後のチャレンジ
ttccddtoki
6
2.5k
スタートアップに選択肢を 〜生成AIを活用したセカンダリー事業への挑戦〜
nstock
0
260
Coinbase™®️ USA Contact Numbers: Complete 2025 Support Guide
officialcoinbasehelpcenter
0
460
AI専用のリンターを作る #yumemi_patch
bengo4com
6
4.4k
いつの間にか入れ替わってる!?新しいAWS Security Hubとは?
cmusudakeisuke
0
140
Featured
See All Featured
Building an army of robots
kneath
306
45k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
How to Think Like a Performance Engineer
csswizardry
25
1.7k
BBQ
matthewcrist
89
9.7k
The Straight Up "How To Draw Better" Workshop
denniskardys
235
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
The Cult of Friendly URLs
andyhume
79
6.5k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.4k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
6
310
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
The Language of Interfaces
destraynor
158
25k
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は便利