mirror of
https://github.com/CyC2018/Interview-Notebook.git
synced 2026-11-21 13:33:45 +00:00
Update Linux.md
重新绘制磁盘与文件系统的配图,补充 NVMe 和线上问题排查常用的命令。
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="340" viewBox="0 0 760 340">
|
||||
<style>
|
||||
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
|
||||
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
|
||||
.b { font-weight: bold; }
|
||||
.c { text-anchor: middle; }
|
||||
.e { text-anchor: end; }
|
||||
.sub { font-size: 11px; fill: #6E6E6E; }
|
||||
.note { fill: #C0605A; }
|
||||
.ok { fill: #6A9F68; }
|
||||
.mono { font-family: Menlo, Consolas, monospace; }
|
||||
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
|
||||
.red { stroke: #C0605A; marker-end: url(#r); }
|
||||
.green { stroke: #6A9F68; marker-end: url(#g); }
|
||||
.dash { stroke-dasharray: 5 4; }
|
||||
.line { stroke: #555; stroke-width: 1.1; fill: none; }
|
||||
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
|
||||
.shadow { fill: #DADADA; }
|
||||
</style>
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
|
||||
</marker>
|
||||
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
|
||||
</marker>
|
||||
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="#FFFFFF"/>
|
||||
|
||||
<text x="380" y="28" class="title">inode 中的 block 指针(block 大小为 1 KB)</text>
|
||||
<rect x="30" y="50" width="160" height="250" rx="6" fill="#C6ECE9" stroke="#7DBCB7"/>
|
||||
<text x="110" y="70" class="c b" style="fill:#444">inode</text>
|
||||
<rect x="44" y="82" width="132" height="28" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="110" y="100" class="c sub" style="fill:#444">权限、拥有者</text>
|
||||
<rect x="44" y="116" width="132" height="28" rx="3" fill="#FFFFFF" stroke="#BBBBBB" stroke-width="1"/>
|
||||
<text x="110" y="134" class="c sub" style="fill:#444">大小、时间</text>
|
||||
<rect x="44" y="150" width="132" height="28" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="110" y="168" class="c sub" style="fill:#444">直接指针 × 12</text>
|
||||
<rect x="44" y="184" width="132" height="28" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="110" y="202" class="c sub" style="fill:#444">一级间接</text>
|
||||
<rect x="44" y="218" width="132" height="28" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="110" y="236" class="c sub" style="fill:#444">二级间接</text>
|
||||
<rect x="44" y="252" width="132" height="28" rx="3" fill="#C6E4FB" stroke="#7FB2D6" stroke-width="1"/>
|
||||
<text x="110" y="270" class="c sub" style="fill:#444">三级间接</text>
|
||||
<line x1="178" y1="164" x2="300" y2="92" class="arrow "/>
|
||||
<text x="330" y="80" class="sub" style="fill:#444">12 个数据块:12 KB</text>
|
||||
<rect x="300" y="88" width="20" height="14" rx="2" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<rect x="324" y="88" width="20" height="14" rx="2" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<rect x="348" y="88" width="20" height="14" rx="2" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<rect x="372" y="88" width="20" height="14" rx="2" fill="#EAE9E7" stroke="#BFBEBA" stroke-width="1"/>
|
||||
<line x1="178" y1="198" x2="300" y2="150" class="arrow "/>
|
||||
<rect x="300" y="140" width="70" height="24" rx="3" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<text x="335" y="156" class="c sub" style="fill:#444">256 个指针</text>
|
||||
<line x1="372" y1="152" x2="410" y2="152" class="arrow "/>
|
||||
<text x="420" y="156" class="sub" style="fill:#444">256 个数据块:256 KB</text>
|
||||
<line x1="178" y1="232" x2="300" y2="206" class="arrow "/>
|
||||
<rect x="300" y="196" width="70" height="24" rx="3" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<text x="335" y="212" class="c sub" style="fill:#444">256</text>
|
||||
<line x1="372" y1="208" x2="398" y2="208" class="arrow "/>
|
||||
<rect x="400" y="196" width="70" height="24" rx="3" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<text x="435" y="212" class="c sub" style="fill:#444">256 × 256</text>
|
||||
<text x="480" y="212" class="sub" style="fill:#444">65536 个数据块:64 MB</text>
|
||||
<line x1="178" y1="266" x2="300" y2="262" class="arrow "/>
|
||||
<rect x="300" y="252" width="50" height="24" rx="3" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<text x="325" y="268" class="c sub" style="fill:#444">256</text>
|
||||
<rect x="360" y="252" width="50" height="24" rx="3" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<text x="385" y="268" class="c sub" style="fill:#444">256²</text>
|
||||
<rect x="420" y="252" width="50" height="24" rx="3" fill="#E6E3FA" stroke="#B8B0DE" stroke-width="1"/>
|
||||
<text x="445" y="268" class="c sub" style="fill:#444">256³</text>
|
||||
<text x="480" y="268" class="sub" style="fill:#444">16777216 个数据块:16 GB</text>
|
||||
<text x="30" y="324" class="sub">一个 1 KB 的块能存 1024 / 4 = 256 个块号,合计 12 + 256 + 256² + 256³ = 16843020 个块,约 16 GB,与 ext2 的最大文件一致。</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.2 KiB |
Reference in New Issue
Block a user