Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
システム強制終了時に ファイルシステムの整合性を保つ ~ ジャーナリング編 ~
Search
Satoru Takeuchi
PRO
April 29, 2026
Technology
82
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
システム強制終了時に ファイルシステムの整合性を保つ ~ ジャーナリング編 ~
以下動画のスライドです
https://youtu.be/vNeJ9CLzv_I
Satoru Takeuchi
PRO
April 29, 2026
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
119-多機能ファイルシステムBtrfs_のコピー.pdf
sat
PRO
1
70
Linuxカーネルの インタフェースは変わりうる?
sat
PRO
1
95
あなたの知らないバージョン命名規則
sat
PRO
3
900
Rook: Intro and Deep Dive with Ceph
sat
PRO
1
64
Machine Check Exception
sat
PRO
2
66
バイナリダンプの模様を読む
sat
PRO
0
89
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
89
114-ファイルのshallow_copy.pdf
sat
PRO
2
58
113-Btrfsのスナップショット.pdf
sat
PRO
0
40
Other Decks in Technology
See All in Technology
負債のメタファと2026年 / Debt Metaphor in Agentic Engineering Age 202609 Edition
twada
PRO
10
4.3k
SREは、MCPとAutopilotをこう使え!
kazumax55
3
910
事業課題から技術的負債に向き合う
sansantech
PRO
2
2k
AIで社員の自主発信に広報目線を組み込む
_mossann_t
0
130
Vibe Coding で作ったプロダクトをどう安全に動かすか / How to Safely Run Products Built with Vibe Coding
glidenote
0
310
安心して変更できるWebフロントエンドの作り方
pirosikick
5
2.8k
データ_AIの事業の勝敗をわけるもの
nek0128
1
460
Cloudflare Workers 向けアプリを C# で構築する ~WASM Native AOT への道~
nenonaninu
1
550
AgentCore Runtime上にAgentic Coding基盤を構築・展開する際の設計ポイントと限界点 / Design considerations and limitations when building an agentic coding platform on AgentCore Runtime
har1101
5
470
Azure Serverless 2026:Production-ready な AI エージェント基盤 / Azure Serverless 2026: Production-Ready AI Agent Platform
miyake
2
350
サーバーレスをどこまで使う? WebRTC対戦ゲームで選んだVPSとの共存設計
kaidouji85
0
190
`t*(42&t>>10)`だけで音楽が鳴る、Swiftで実装するBytebeat / iOSDC Japan 2026
yutailang0119
0
120
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
41
2.7k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
500
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
810
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
Visualization
eitanlees
152
17k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
So, you think you're a good person
axbom
PRO
2
2.2k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Transcript
システム強制終了時に ファイルシステムの整合性を保つ ~ ジャーナリング編 ~ Apr. 30th, 2026 Satoru Takeuchi
X: satoru_takeuchi 1
• ファイルシステムの更新中に不整合な状態でシステムが異常終了したとする ◦ 📝 過去動画: その109「ファイルシステム不整合」 • この状態から回復するファイルシステムの機能の一つがジャーナリング ◦ モダンなファイルシステムでは
ext4やXFSがサポート / foo bar huga hoge 本来どちらか1つからのみ参 照されるべき ジャーナリング 2
ジャーナリングをサポートするファイルシステムの変更 1. ユーザから変更要求が来る 2. ディスク内のジャーナル領域という場所に「どのファイルにどのような変更を加える か」を記録 3. 実際の変更を加える 3 ファイルシステムの
ドライバ (1) 変更要求 ジャーナル領域 ファイルシステムのデータ、メタ データ領域 (2) 変更内容の書き込み (3) 変更
初期状態 • 以下の状況で”mv bar foo”コマンドを実行する ◦ ファイルシステムはジャーナリング機能をサポート / foo bar
huga hoge ジャーナル領域
まずはジャーナル領域に何をするかを書き込む / foo bar huga hoge barをfoo以下に移動させる ジャーナル領域
fooからbarにリンクを張る / foo bar huga hoge barをfoo以下に移動させる ジャーナル領域
ここでシステムが異常終了 / foo bar huga hoge barをfoo以下に移動させる ジャーナル領域 異常終了
再起動後 • barはルートディレクトリからもfooからも参照されている不整合な状態 / foo bar huga hoge barをfoo以下に移動させる ジャーナル領域
mountを試みる • mountしようとするとext4ドライバが「ジャーナル領域に書き込まれた処理が完了し ていない」ことを検出 ◦ ext2と異なり通常はmount前にfsckを実行しない / foo bar huga
hoge barをfoo以下に移動させる ジャーナル領域
リプレイ処理 • ジャーナル領域に書いたことをやりなおす 1. fooからbarにリンクを張る 2. “/”からbarへのリンクを削除する / foo bar
huga hoge barをfoo以下に移動させる ジャーナル領域
ジャーナルログを削除 • これで処理完了 / foo bar huga hoge barをfoo以下に移動させる ジャーナル領域
コミットとチェックポイント • 実際は性能向上のため「ファイルのディレクトリを移動」というような小さな単位では なく、変更を複数束ねたまとまりごとに「コミット」する • コミットとは「コミット前にジャーナル領域に書かれている情報はシステムが異常終 了しても後から確実にファイルシステムに反映できる」という印 • システム強制終了時のリプレイ処理 ◦
コミット前のログ→ジャーナル領域に書かれている変更内容は全部捨てる ◦ コミット後のログ→前述の通り • ジャーナル領域に書かれたことを実際のファイルシステムのデータに反映すること をチェックポイントと呼ぶ 12
その他いろいろ • ファイルシステムがHDDベースだとして、ジャーナル領域だけSSDに置いて処理を 高速化させる手法がある • ここでは説明しないがジャーナリングにはモードがいろいろある ◦ ext4の場合「journal,ordered,writeback」 ◦ 一長一短ある。興味があれば調べてほしい
• データベースのWrite Ahead Log(WAL)も基本的な考え方は同じ 13
まとめ • ジャーナリングはシステムの強制終了時にファイルシステムの整合性を保つ機能 の一つ • ファイルシステムへの変更は、まずジャーナル領域に書き、その後実際のファイル システムに書くことによって整合性を保つ 14