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
0030_loopback_device.pdf
Search
Satoru Takeuchi
PRO
August 24, 2021
Technology
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
0030_loopback_device.pdf
Satoru Takeuchi
PRO
August 24, 2021
More Decks by Satoru Takeuchi
See All by Satoru Takeuchi
Machine Check Exception
sat
PRO
2
37
バイナリダンプの模様を読む
sat
PRO
0
68
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
3
54
114-ファイルのshallow_copy.pdf
sat
PRO
2
38
113-Btrfsのスナップショット.pdf
sat
PRO
0
16
システム強制終了時にファイルシステムの整合性を保つ~ コピーオンライト編 ~
sat
PRO
0
59
システム強制終了時に ファイルシステムの整合性を保つ ~ ジャーナリング編 ~
sat
PRO
2
63
ファイルシステムの整合性を回復するfsck
sat
PRO
1
65
小学校5,6年生向けキャリア教育 大人になるまでの道
sat
PRO
8
5.3k
Other Decks in Technology
See All in Technology
SRE Next 2026 何でも屋からの脱却
bto
0
1k
AIが実装を自走する時代の認知負債との戦い
lycorptech_jp
PRO
1
450
「最後に責任を取るのはチーム」— 人間のPRレビューを最小化してアップデートしたメンタルモデル
jnishime_dresscode
0
940
AI時代の開発生産性は、個人技からチーム設計へ
moongift
PRO
4
2.4k
アップデートで何が変わった?デモで学んで使いこなすIBM Bob2.0
muehara
0
170
CIで使うClaude
iwatatomoya
0
290
AI、CDK と協働する Full TypeScript アプリケーション開発 / Full TypeScript Application with AI and CDK
geekplus_tech
2
400
しくみを学んで使いこなそう GitHub Copilot app
torumakabe
2
290
Network Firewallやっていき!
news_it_enj
0
170
ヘルスケア領域における AI 活用と その安全性担保のための取り組み (Leveraging AI in Healthcare and Our Efforts to Ensure Its Safety) - Google I/O Extended Tokyo 2026, July 11, 2026
zettaittenani
0
430
OpenTelemetryにおけるGoのゼロコード・コンパイル時計装について #fukuokago
quiver
0
120
LLMやAIエージェントをソフトウェアに組み込むプラクティス
shibuiwilliam
2
430
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.4k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
350
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
250
Producing Creativity
orderedlist
PRO
348
40k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.7k
Transcript
loop device Jul. 24th, 2021 Satoru Takeuchi twitter: satoru_takeuchi 1
loop deviceとは? • ファイルをブロックデバイスとして認識させるための機能 • loopback deviceとも呼ばれる • 主にファイル上に作ったファイルシステムイメージのmountに使う ◦
ファイルシステムイメージ (とくにisoイメージ)の読み書き ◦ ファイルシステムのテスト 2
使い方 1. ファイル上にファイルシステムを作成 ◦ # dd if=/dev/zero of=test.img bs=1G count=1
◦ # mkfs.ext4 test.img 2. loop deviceを作る ◦ # losetup -f --show test.img 3. mount ◦ # mount /dev/loop0 /mnt 4. 使う 5. umount ◦ # umount /mnt 6. loop deviceを削除 ◦ # losetup -d /dev/loop0 3 ext4ファイルシステム test.img /dev/loop0 ストレートマップ ext4としてマウント可能
実はもっと楽ができる • ファイル上にファイルシステムを作ってあれば以下コマンドでマウント可能 ◦ # mount test.img /mnt • loop
deviceの管理はmountコマンドが勝手にやってくれる 4
まとめ • loop deviceはファイルをブロックデバイスとして扱うための機能 • そのデバイスをファイルシステムとしてmountして使うことが多い ◦ ISOファイルの読み書き ◦ ファイルシステムのテスト
• losetupコマンドで管理するが、直接使わなくて済むことが多い 5