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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
cpコマンドはディスク上でデータを コピーしないことがある
sat
PRO
2
19
114-ファイルのshallow_copy.pdf
sat
PRO
1
14
113-Btrfsのスナップショット.pdf
sat
PRO
0
6
システム強制終了時にファイルシステムの整合性を保つ~ コピーオンライト編 ~
sat
PRO
0
54
システム強制終了時に ファイルシステムの整合性を保つ ~ ジャーナリング編 ~
sat
PRO
1
58
ファイルシステムの整合性を回復するfsck
sat
PRO
1
59
小学校5,6年生向けキャリア教育 大人になるまでの道
sat
PRO
8
4.9k
ファイルシステムの不整合
sat
PRO
2
150
書籍執筆での生成AIの活用
sat
PRO
2
510
Other Decks in Technology
See All in Technology
入門!AWS Blocks
ysuzuki
1
110
Claude Code×Terraform IaC テンプレート駆動開発
itouhi
1
510
AI-DLCを活用した高品質・安全なAI駆動開発実践 / AI Driven Development with AI-DLC
yoshidashingo
0
180
日本 Fintech 未来予測レポート 2027〜2028年(手動編集版)
8maki
0
2.2k
自宅LLMの話
jacopen
1
500
NAB Show 2026 動画技術関連レポート / NAB Show 2026 Report
cyberagentdevelopers
PRO
0
190
人材育成分科会.pdf
_awache
1
130
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
6
2k
エンジニアリング戦略の作り方 / Crafting Engineering Strategy
iwashi86
21
6.8k
就職⽀援サービスにおけるキャリアアドバイザーのシフトスケジューリング
recruitengineers
PRO
1
140
Kubernetesにおける学習基盤とLLMOpsの概要
ry
1
270
2026TECHFRESH畢業分享會 - Lightning Talk - E起 See See : 電商推薦讀心術? 數據說了算
line_developers_tw
PRO
0
920
Featured
See All Featured
Building an army of robots
kneath
306
46k
BBQ
matthewcrist
89
10k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
Are puppies a ranking factor?
jonoalderson
1
3.5k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
380
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
170
A Tale of Four Properties
chriscoyier
163
24k
RailsConf 2023
tenderlove
30
1.5k
Facilitating Awesome Meetings
lara
57
7k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
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